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

improvement txpool code #278

Merged
merged 4 commits into from
Jun 11, 2024
Merged

improvement txpool code #278

merged 4 commits into from
Jun 11, 2024

Conversation

novosandara
Copy link

Description

Improvement txpool code

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Documentation update

Additional comments

@novosandara
Copy link
Author

This PR introduces two optimizations to the txPool:

We observed that a significant portion of time during transaction validation in txpool is spent on determining the sender ("from" information) using p.signer.Sender(tx). To expedite the validation process for invalid transactions, we've postponed this check to a later stage. Valid transactions remain unaffected by this change, but it ensures quicker feedback for invalid transactions.

During transaction addition, we noticed that even when Trace logging isn't enabled by default, the transaction hash is unnecessarily converted to a string for logging purposes. To streamline this process, we've optimized the handling to avoid this conversion, enhancing efficiency.

@novosandara novosandara merged commit 6311b24 into develop Jun 11, 2024
10 checks passed
@novosandara novosandara deleted the Improvement_txpool_code branch June 11, 2024 14:38
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.

3 participants