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(mempool): allow internal batch dependencies #549

Merged
merged 13 commits into from
Nov 29, 2024

Conversation

Mirko-von-Leipzig
Copy link
Contributor

@Mirko-von-Leipzig Mirko-von-Leipzig commented Nov 13, 2024

This PR fixes a crash when a batch contained both a parent and child transaction.

In addition, this PR improves the error presentation when the node crashes.


Background: client integration tests were stalling when run against the new mempool based block-producer. This PR fixes the bug that causes this.

The stall occurred because the block-producer component exited, but the node continued on as it only crashes if a component errors. This PR rectifies this behaviour; we now crash the node if any component ends. In addition, this PR improves the errors by identifying the failing component.

This PR also merges in next. This was required to properly compare and debug the client integration tests. It might be best to review the last few commits instead.

Mirko-von-Leipzig and others added 11 commits November 2, 2024 10:14
Clippy issue rust-lang/rust-clippy#12281 was fixed
in v1.81. We now have MSRV of 1.82 allowing us to remove our workaround.

More specifically, #[async_trait] was triggering this lint, and as of 1.81 no
longer does.
* refactor: improve `ApplyBlockErrors` variants

* docs: update `CHANGELOG.md`

* refactor: address review comments
* Update state.rs

* docs: Update expect()

* chore: Lints
Improve block-producer top-level errors.
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review November 13, 2024 13:07
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.

Overall LGTM, but not too familiar with the context of the graph which was causing the issue in the first place so leaving a few comments while I check out the rest of the codebase

bin/node/src/commands/start.rs Show resolved Hide resolved
bin/node/src/commands/start.rs Show resolved Hide resolved
crates/block-producer/src/server/mod.rs 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 a couple of small comments inline.

crates/block-producer/src/mempool/batch_graph.rs Outdated Show resolved Hide resolved
@Mirko-von-Leipzig Mirko-von-Leipzig merged commit 39828bf into next-block-producer Nov 29, 2024
8 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the mirko/fix/mempool branch November 29, 2024 14:52
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.

4 participants