-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staking store keys bug fix + memory improvement #2435
Conversation
This is done by removing repeated appends, which will create a new slice if theres insufficient capacity, and instead creating a key of the correct size, and then copying the data into it.
Codecov Report
@@ Coverage Diff @@
## develop #2435 +/- ##
==========================================
Coverage ? 61.18%
==========================================
Files ? 123
Lines ? 7396
Branches ? 0
==========================================
Hits ? 4525
Misses ? 2558
Partials ? 313 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
var ( | ||
pk1 = ed25519.GenPrivKey().PubKey() | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have unit tests for GetREDByValSrcIndexKey
and GetREDByValDstIndexKey
? Otherwise, this LGTM. Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any to my knowledge. I can make some
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do that, but it can be in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
var ( | ||
pk1 = ed25519.GenPrivKey().PubKey() | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do that, but it can be in a separate PR.
Improves memory efficiency of getting store keys
This is done by removing repeated appends, which will create a new
slice if theres insufficient capacity, and instead creating a key
of the correct size, and then copying the data into it.
This PR also Removes empty bytes from ValidatorPowerRank store key
Closes #2433
Please do not squash, and review commit by commit.
docs/
) - n/a?PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: