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

Refactor Worker's AddrQueue to Include pendingTxPerAddressTracker #2368

Closed
Psykepro opened this issue Aug 3, 2023 · 0 comments
Closed

Refactor Worker's AddrQueue to Include pendingTxPerAddressTracker #2368

Psykepro opened this issue Aug 3, 2023 · 0 comments
Assignees
Milestone

Comments

@Psykepro
Copy link
Contributor

Psykepro commented Aug 3, 2023

Overview:

As part of the ongoing efforts to improve the efficiency and reliability of the Worker module, we propose to move the pendingTxPerAddressTrackers to the Worker's AddrQueue. By doing this, we can utilize it in the AddrQueue.IsEmpty function to ensure all pending transactions are processed before returning true. This modification will help prevent potential transaction sequencing issues and enhance data consistency.

Recommended Changes:

  1. Update the AddrQueue Structure:

    • Integrate the pendingTxPerAddressTrackers into the AddrQueue structure of the Worker module. This will require a redefinition of the AddrQueue structure and the necessary amendments in the functions interacting with this structure.
  2. Modify AddrQueue.IsEmpty Function:

    • Modify the AddrQueue.IsEmpty function to leverage the integrated pendingTxPerAddressTracker. The function should check for any pending transactions associated with the address and only return true once all transactions have been processed.

Objective:

The objective of these changes is to ensure that the AddrQueue.IsEmpty function considers pending transactions before indicating that the queue is empty. By doing this, we can avoid the premature initiation of a new AddrQueue for an address and prevent potential sequencing and data consistency issues. Furthermore, it helps to enhance the overall performance and reliability of the Worker module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants