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/remove malleated tx cache #834

Conversation

rahulghangas
Copy link
Contributor

@rahulghangas rahulghangas commented Aug 15, 2022

Description

Remove malleated txns correctly from cache by adding a new method RemoveTxByKey to TxCache which accepts the tx key(hash) instead of the raw tx

Relevant files:

  • mempool/cache.go
  • mempool/v1/mempool.go

Checks:

  • Tests for new cache method RemoveTxByKey
  • Regression test for removing malleated txns

Closes: #788

Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

nice!! 👍 I'd approve w/o tbh since the same mechanism is already tested in the mempool, but it might be nice to have a very simple test, like here, just for the cache too to make sure we don't accidentally remove this functionality.

@rahulghangas rahulghangas marked this pull request as ready for review August 16, 2022 06:07
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

💯 💵

@rahulghangas rahulghangas merged commit 100cf0a into celestiaorg:v0.34.x-celestia Aug 16, 2022
@rahulghangas rahulghangas deleted the fix/remove-malleated-tx-cache branch August 16, 2022 15:32
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.

Invalid malleated txs are not removed from the mempool cache
3 participants