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(block-producer): handle reverted batches #557

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

Mirko-von-Leipzig
Copy link
Contributor

@Mirko-von-Leipzig Mirko-von-Leipzig commented Dec 2, 2024

This PR corrects the mempool's behaviour when batches are reverted.

More concretely, it fixes an issue where a child batch jobs weren't invalidated when their parent batch was reverted. This is fixed by actively tracking inflight batch jobs, and ignoring submitted jobs not part of this list.

@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko/fix/mempool-reverts branch from 7e1761b to 9076e33 Compare December 2, 2024 07:36
@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko/fix/mempool-reverts branch from 9076e33 to a825ade Compare December 2, 2024 07:37
@Mirko-von-Leipzig Mirko-von-Leipzig changed the title Mirko/fix/mempool reverts feat(block-producer): handle reverted batches Dec 2, 2024
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review December 2, 2024 07:45
@Mirko-von-Leipzig Mirko-von-Leipzig changed the title feat(block-producer): handle reverted batches fix(block-producer): handle reverted batches Dec 2, 2024
@bobbinth bobbinth requested review from bobbinth and igamigo December 2, 2024 17:19
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

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

LGTM!

crates/block-producer/src/mempool/dependency_graph.rs Outdated Show resolved Hide resolved
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 one comment inline: it feels like BatchGraph is potentially a more natural place to track this info - but I also didn't think it through completely to see what kind of issues this may cause.

crates/block-producer/src/mempool/mod.rs Outdated Show resolved Hide resolved
@Mirko-von-Leipzig Mirko-von-Leipzig merged commit 3b1ac1f into next-block-producer Dec 4, 2024
8 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the mirko/fix/mempool-reverts branch December 4, 2024 10:37
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.

3 participants