-
Notifications
You must be signed in to change notification settings - Fork 81
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
Cache gvr in-memory #801
Cache gvr in-memory #801
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.
Added some comments, and realised afterwards that I think it would be better if the cache lived in the Validator rather than DbSlashingProtection, which may invalidate some of my comments.
...rotection/src/main/java/tech/pegasys/web3signer/slashingprotection/DbSlashingProtection.java
Outdated
Show resolved
Hide resolved
...ction/src/test/java/tech/pegasys/web3signer/slashingprotection/DbSlashingProtectionTest.java
Outdated
Show resolved
Hide resolved
...java/tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidator.java
Fixed
Show fixed
Hide fixed
...java/tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidator.java
Show resolved
Hide resolved
...java/tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidator.java
Outdated
Show resolved
Hide resolved
...java/tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidator.java
Outdated
Show resolved
Hide resolved
...java/tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidator.java
Outdated
Show resolved
Hide resolved
.../tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidatorTest.java
Outdated
Show resolved
Hide resolved
Just remembered - need a changelog entry? |
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.
Just minor nit 👍
.../tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidatorTest.java
Show resolved
Hide resolved
.../tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidatorTest.java
Show resolved
Hide resolved
...java/tech/pegasys/web3signer/slashingprotection/validator/GenesisValidatorRootValidator.java
Show resolved
Hide resolved
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.
LGTM
PR Description
Cache gvr in-memory so that maySign and maySignBlock doesn't hit database on every call as gvr is not meant to change once inserted and loaded.
Fixed Issue(s)
Fixes #600
May support: #798
Documentation
doc-change-required
label to this PR if updates are required.Changelog