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

Cache gvr in-memory #801

Merged
merged 15 commits into from
Jun 14, 2023
Merged

Cache gvr in-memory #801

merged 15 commits into from
Jun 14, 2023

Conversation

usmansaleem
Copy link
Collaborator

@usmansaleem usmansaleem commented Jun 13, 2023

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

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@usmansaleem usmansaleem requested review from jframe and siladu June 13, 2023 03:24
Copy link
Contributor

@siladu siladu left a 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.

@siladu
Copy link
Contributor

siladu commented Jun 13, 2023

Just remembered - need a changelog entry?

Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

Just minor nit 👍

Copy link
Contributor

@jframe jframe left a comment

Choose a reason for hiding this comment

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

LGTM

@usmansaleem usmansaleem merged commit c2d70af into Consensys:master Jun 14, 2023
@usmansaleem usmansaleem deleted the cached_gvr branch June 14, 2023 05:16
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.

Cache GVR from DB
3 participants