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

Rework TxPool dependency graph to avoid crashes and strange behaviours #1961

Open
xgreenx opened this issue Jun 14, 2024 · 0 comments
Open
Assignees
Labels
epic An epic is a high-level master issue for large pieces of work.

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Jun 14, 2024

Overview

TxPool transactions management logic is complex and smeared across several files, leading to inconsistent updates.

As an example, it is possible to cause a crash on the line below:
image

Because the remove function missed some dependent transactions from the by_dependency field.

Solution

We need to rework the transaction pool and incorporate the logic of the transaction management side of one structure. Taking into account the work required for #1229 and #868, it seems we can simplify the logic of how transactions are validated. We don't need to replace transactions based on tips. We just can keep them in memory in another dependency graph.

More simple rules should reduce room for error.

@xgreenx xgreenx self-assigned this Jun 17, 2024
@xgreenx xgreenx added the epic An epic is a high-level master issue for large pieces of work. label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic An epic is a high-level master issue for large pieces of work.
Projects
None yet
Development

No branches or pull requests

1 participant