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

fix: ante handler skip condition #1040

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

byte-bandit
Copy link
Contributor

@byte-bandit byte-bandit commented Nov 23, 2023

Related Github tickets

Background

After more investigation, it's become apparent that there are transactions which are being rejected in the CometBFT mempool, I don't think they ever reach the app mempool.

The reason for the rejection is the account sequence mismatch. Theoretically, this should be verified when submitting a transaction.

Looking at the code, there is a precondition in our ante handler for signature verification that's being skipped if we're running CheckTX - so it's possible for a transaction that would actually fail to still be included in the mempool, as it looks like the check is only run once the TX is actually executed.

Tested this in public test net against a dev build and had promising results, meaning most TXs got rejected and evicted during the CheckTX stage.

However, 6 transactions remain to be stuck. I'm not entirely sure why. It's possible they're being re-broadcasted from the other nodes. Once all validators upgrade to the next version with this change in place, we will know.

Testing completed

  • test coverage exists or has been added/updated
  • tested in a private testnet

Breaking changes

  • I have checked my code for breaking changes
  • If there are breaking changes, there is a supporting migration.

@byte-bandit byte-bandit enabled auto-merge (squash) November 23, 2023 10:57
Copy link
Contributor

@taariq taariq left a comment

Choose a reason for hiding this comment

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

LGTM and TEST!

@byte-bandit byte-bandit merged commit 4ebffc6 into palomachain:master Nov 23, 2023
2 checks passed
@taariq taariq deleted the clohr/mempool-fix branch November 23, 2023 13:57
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.

2 participants