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

Signature Cache is not being used, even when activated, leading to poorer performance #1850

Open
SergioDemianLerner opened this issue Aug 3, 2022 · 1 comment

Comments

@SergioDemianLerner
Copy link
Contributor

The signatures of transactions in blocks re verified in Transaction.validate() when getSender() is called.
Transaction.validate() is called by Transaction.verify() which is called by the rules BlockTxsValidationRule and BlockTxsFieldsValidationRule.

The solutions is either to inject the sender from the cache into into the Transaction, or to pass the signatureCache to the verify() method, so that the cached sender is used instead of getSender().

I think that getSender() should be marked as a debug method to avoid being used by mistake, and getSender(cache) should be used everywhere.

@SergioDemianLerner
Copy link
Contributor Author

unit tests missing

@nagarev nagarev mentioned this issue Sep 9, 2022
8 tasks
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

No branches or pull requests

1 participant