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

dev: track invalid transactions by sender in pool #12138

Merged

Conversation

greged93
Copy link
Contributor

@greged93 greged93 commented Oct 28, 2024

This PR modifies the tracking of invalid transactions in the pool by tracking them by sender id instead of transaction hash.

Resolves #12136

Comment on lines 99 to 104
// Mark all descendants as invalid
let mut descendant_id = tx.id().descendant();
while let Some(descendant) = self.all.get(&descendant_id) {
self.invalid.insert(*descendant.transaction.hash());
descendant_id = descendant.transaction.id().descendant();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we kinda already have an euqivalent check for this in next, so what we actually need to check instead is marking the SenderId as self.invalid and not the hash. so instead of self.invalid.insert(*tx.hash()); we need to track the tx.sender_id instead

Copy link
Contributor Author

@greged93 greged93 Oct 28, 2024

Choose a reason for hiding this comment

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

sorry I misunderstood the issue, getting on it

@mattsse mattsse added the A-tx-pool Related to the transaction mempool label Oct 28, 2024
@mattsse mattsse added this pull request to the merge queue Oct 28, 2024
Merged via the queue into paradigmxyz:main with commit 4621578 Oct 29, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Track invalid transactions by sender
2 participants