-
Notifications
You must be signed in to change notification settings - Fork 48
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: recover sender only for those txs that are included #1636
fix: recover sender only for those txs that are included #1636
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small change to moving sender recovery to before the call to attemptAddTransaction
e238ba2
to
536b1bc
Compare
536b1bc
to
faec421
Compare
Is it will still slow especially for ERC20 or ETH txs, since each batch can include 700+ transactions because it uses serial mode? |
This PR optimises sender recovery to avoid it for txs that will no be included. But I can not do that in parallel:
|
* fix: recover sender only for those txs that are included * Moved recovering sender out of addTransaction. Default context used for sender recovery.
* fix: recover sender only for those txs that are included * Moved recovering sender out of addTransaction. Default context used for sender recovery.
Performance improvement for cases when due to constraints such as gas limits and counter overflows only a few transactions are included in the block.
For 5000 plain send tx:
original version:
INFO[01-15|16:03:56.498] Total time to recover sender total.ms=11457 totalCalls=13342
fixed version:
INFO[01-15|15:53:51.740] Total time to recover sender total.ms=457 totalCalls=5635
Closes #1605
NOTE: optimisation of hash calculation will be addressed in #1599