rep_weights part 2 - Store representative weights in database#4483
Merged
clemahieu merged 7 commits intonanocurrency:developfrom Mar 22, 2024
Merged
rep_weights part 2 - Store representative weights in database#4483clemahieu merged 7 commits intonanocurrency:developfrom
clemahieu merged 7 commits intonanocurrency:developfrom
Conversation
simpago
commented
Mar 12, 2024
simpago
commented
Mar 12, 2024
e6512cf to
221cded
Compare
clemahieu
reviewed
Mar 22, 2024
This is needed, because reps_cache will get access to the new rep_cache data store.
221cded to
ef64ecb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the second part of multiple stacked and self-contained pull requests. The previous part is #4482. The next part is #4485.
Overall Goal
With the recent spam attack the number of representatives has increased significantly. All representatives and their vote weight are held in memory and this isn't a viable solution anymore. This series of pull requests moves the representatives out of memory and stores them in the database.
What this PR does
This PR inserts all representative weights into the database and also adjusts those weights whenever the rep_weights cache is updated. Still all representatives are in memory, but this will change in the next PR.