Skip to content
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
merged 7 commits into from
Mar 22, 2024

Conversation

simpago
Copy link
Contributor

@simpago simpago commented Mar 12, 2024

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.

nano/store/lmdb/lmdb.cpp Outdated Show resolved Hide resolved
@simpago simpago force-pushed the store-rep-weights-on-disk branch 3 times, most recently from e6512cf to 221cded Compare March 19, 2024 06:29
nano/secure/account_info.hpp Outdated Show resolved Hide resolved
nano/core_test/ledger.cpp Outdated Show resolved Hide resolved
nano/secure/rep_weights.cpp Show resolved Hide resolved
nano/secure/rep_weights.cpp Show resolved Hide resolved
nano/secure/rep_weights.cpp Outdated Show resolved Hide resolved
@clemahieu clemahieu merged commit c2a90d1 into nanocurrency:develop Mar 22, 2024
24 of 27 checks passed
@simpago simpago deleted the store-rep-weights-on-disk branch March 22, 2024 17:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Merged / V27.0
Development

Successfully merging this pull request may close these issues.

4 participants