-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rep_weights part 2 - Store representative weights in database #4483
Merged
clemahieu
merged 7 commits into
nanocurrency:develop
from
rsnano-node:store-rep-weights-on-disk
Mar 22, 2024
Merged
rep_weights part 2 - Store representative weights in database #4483
clemahieu
merged 7 commits into
nanocurrency:develop
from
rsnano-node:store-rep-weights-on-disk
Mar 22, 2024
Conversation
This file contains 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
simpago
commented
Mar 12, 2024
simpago
commented
Mar 12, 2024
simpago
force-pushed
the
store-rep-weights-on-disk
branch
from
March 13, 2024 08:37
eec74af
to
f069345
Compare
simpago
force-pushed
the
store-rep-weights-on-disk
branch
3 times, most recently
from
March 19, 2024 06:29
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.
simpago
force-pushed
the
store-rep-weights-on-disk
branch
from
March 22, 2024 12:56
221cded
to
ef64ecb
Compare
# for free
to join this conversation on GitHub.
Already have an account?
# 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.