Skip to content

rep_weights part 1 - Add data store for representative weights#4482

Merged
dsiganos merged 1 commit intonanocurrency:developfrom
rsnano-node:rep-weight-table
Mar 19, 2024
Merged

rep_weights part 1 - Add data store for representative weights#4482
dsiganos merged 1 commit intonanocurrency:developfrom
rsnano-node:rep-weight-table

Conversation

@simpago
Copy link
Copy Markdown
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.

@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
Copy Markdown
Contributor Author

simpago commented Mar 16, 2024

rebased on top of develop

dsiganos
dsiganos previously approved these changes Mar 19, 2024
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 simpago dismissed stale reviews from dsiganos and pwojcikdev via 0f8e2cf March 19, 2024 05:57
@simpago
Copy link
Copy Markdown
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
@simpago simpago deleted the rep-weight-table branch March 19, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged / V27.0

Development

Successfully merging this pull request may close these issues.

4 participants