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

From OSMO: Make rechecking tx check the sequence number #141

Merged

Conversation

assafmo
Copy link
Member

@assafmo assafmo commented May 11, 2022

@assafmo
Copy link
Member Author

assafmo commented May 11, 2022

@assafmo assafmo merged commit 1933833 into secret-0.45.x May 24, 2022
@assafmo
Copy link
Member Author

assafmo commented May 25, 2022

As explained to me by @ValarDragon, this PR optimizes the RecheckTx step in the mempool code, which sweeps all remaining txs in the mempool after a successful block commit. When RecheckTx is executed it can be assumed that CheckTx was successful for the tx.

  1. This PR makes it that RecheckTx doesn't recheck the tx signature, which was valid on CheckTx. This saves a lot of time.
  2. This PR makes it that RecheckTx checks if the tx sequence number is still valid and removes the tx from the mempool if not. This should eliminate txs with a "sequence mismatch" being proposed and committed on-chain, which is a pain point when there's a huge network traffic spike (NFT drops) and when bots are trying to spam the network.

@assafmo assafmo deleted the pull_rechecking_tx_check_the_sequence_number_from_osmo branch May 25, 2022 20:07
@assafmo assafmo restored the pull_rechecking_tx_check_the_sequence_number_from_osmo branch September 15, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants