Skip to content
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

Import old attestation store #7466

Merged
merged 22 commits into from
Oct 12, 2020
Merged

Import old attestation store #7466

merged 22 commits into from
Oct 12, 2020

Conversation

shayzluf
Copy link
Contributor

@shayzluf shayzluf commented Oct 8, 2020

Feature

What does this PR do? Why is it needed?
Data migration function from old attestation protection db data structure to new one
Which issues(s) does this PR fix?

Part of #7196

Other notes for review

@shayzluf shayzluf added this to the v1.0.0-beta milestone Oct 8, 2020
@shayzluf shayzluf requested a review from a team as a code owner October 8, 2020 11:03
@shayzluf shayzluf self-assigned this Oct 8, 2020
@codecov
Copy link

codecov bot commented Oct 8, 2020

Codecov Report

Merging #7466 into master will decrease coverage by 0.16%.
The diff coverage is 81.13%.

@@            Coverage Diff             @@
##           master    #7466      +/-   ##
==========================================
- Coverage   60.73%   60.57%   -0.17%     
==========================================
  Files         427      427              
  Lines       30545    30383     -162     
==========================================
- Hits        18550    18403     -147     
- Misses       8982     8983       +1     
+ Partials     3013     2997      -16     

@nisdas nisdas removed the Slasher label Oct 8, 2020
@shayzluf shayzluf added the Ready For Review A pull request ready for code review label Oct 9, 2020
last := 0

next:
for _, k1 := range keys {
for _, k2 := range keys[:last] {
if bytes.Equal(k1, k2) {
if bytes.Equal(k1[:], k2[:]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if its a fixed sized array you can compare it directly.

validator/db/kv/manage.go Outdated Show resolved Hide resolved
nisdas
nisdas previously approved these changes Oct 12, 2020
@shayzluf shayzluf merged commit 3d0fc8b into master Oct 12, 2020
@delete-merged-branch delete-merged-branch bot deleted the import_old_attestation_store branch October 12, 2020 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants