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 1 - Add data store for representative weights #4482

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

simpago
Copy link
Contributor

@simpago simpago commented Mar 12, 2024

This is the first part of multiple stacked and self-contained pull requests. The next part is #4483.

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 introduces the store class rep_weight for storing the rep weights in the database. The new store is not used yet. This is the basis for the next PR.

nano/node/make_store.cpp Outdated Show resolved Hide resolved
nano/node/make_store.cpp Outdated Show resolved Hide resolved
nano/store/lmdb/lmdb.cpp Outdated Show resolved Hide resolved
@simpago simpago force-pushed the rep-weight-table branch 2 times, most recently from 0746473 to 30a2d04 Compare March 13, 2024 08:35
pwojcikdev
pwojcikdev previously approved these changes Mar 13, 2024
@simpago
Copy link
Contributor Author

simpago commented Mar 16, 2024

rebased on top of develop

dsiganos
dsiganos previously approved these changes Mar 19, 2024
nano/store/lmdb/lmdb.cpp Outdated Show resolved Hide resolved
Representative weights are currently store in memory and loaded from the
accounts table when the node starts. Because the number of
representatives has grown significantly, we have to store the weights on
disk instead. This commit introduces the store class `rep_weight` for storing
the rep weights.
@simpago
Copy link
Contributor Author

simpago commented Mar 19, 2024

Removed error check when opening rep_weights table

@dsiganos dsiganos merged commit 67eeac3 into nanocurrency:develop Mar 19, 2024
18 of 27 checks passed
@simpago simpago deleted the rep-weight-table branch March 19, 2024 06:50
# 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