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(block-producer): inflight state custody of transaction data #534

Merged

Conversation

Mirko-von-Leipzig
Copy link
Contributor

@Mirko-von-Leipzig Mirko-von-Leipzig commented Oct 31, 2024

This PR upgrades InflightState so that it tracks each transaction's state delta internally. We differentiate between committed and uncommitted transactions. The former cannot be reverted.

This means reverting or committing transactions now only requires passing in the transaction IDs, instead of requiring the full transaction data.

This enables making the inflight state more robust as it now differentiates between committed and uncommitted transaction IDs. Additional work is required to change the current panics into errors instead, though this is left to a future PR as it isn't high priority. Tracked in #537.

Essentially this works towards hardening the different components of the mempool individually so that we can pick up corruption/bugs as soon as possible.

@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko-inflight-state-owns-data branch 2 times, most recently from df42fe0 to 1bbc175 Compare November 1, 2024 11:42
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a couple of comments inline, but they are all minor nits.

@Mirko-von-Leipzig Mirko-von-Leipzig merged commit 225b6f4 into next-block-producer Nov 2, 2024
8 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the mirko-inflight-state-owns-data branch November 2, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants