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

Aptos mempool garbage collection should happen at the beginning of transaction ingress loop. #965

Open
l-monninger opened this issue Dec 18, 2024 · 0 comments · May be fixed by #967
Open
Assignees
Labels
bug Indicates that the issue is a bug or a software defect.

Comments

@l-monninger
Copy link
Collaborator

l-monninger commented Dec 18, 2024

Summary

Aptos mempool garbage collection should happen at beginning of transaction ingress loop. Currently, it happens at the end. As a result, if a single signer retries a failed transaction that should have expired, their first attempted retry will throw an error:

  1. Send in a transaction with sequence number $n$ that gets submitted, but fails. Garbage collect at $t_1$ after submission.
  2. Wait for expiration and try another transaction with sequencer number $n$.
  3. Transaction gets rejected at mempool because previous attempt at sequence has not been garbage collection. Garbage collect at $t_2$.

There is some chance this can cascade outside of the core mempol itself. That is, above the third attempt to submit the transaction should once again succeed at mempool validation. However, it is possible there is some other part of our system which might hold onto the value at $t_1$ and therefore reject, e.g., the memseq mempool.

@l-monninger l-monninger added the bug Indicates that the issue is a bug or a software defect. label Dec 18, 2024
@l-monninger l-monninger self-assigned this Dec 18, 2024
@l-monninger l-monninger linked a pull request Dec 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates that the issue is a bug or a software defect.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant