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

cluster/state: legacy lock json and transform #2182

Merged
merged 4 commits into from
May 12, 2023

Conversation

corverroos
Copy link
Contributor

Add legacy lock serialisation and transform logic.

category: feature
ticket: #1886

@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 49.69% and project coverage change: -0.13 ⚠️

Comparison is base (4693468) 53.58% compared to head (c54ce8f) 53.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2182      +/-   ##
==========================================
- Coverage   53.58%   53.45%   -0.13%     
==========================================
  Files         174      179       +5     
  Lines       23073    23422     +349     
==========================================
+ Hits        12363    12520     +157     
- Misses       9239     9396     +157     
- Partials     1471     1506      +35     
Impacted Files Coverage Δ
cluster/state/ssz_gen.go 27.36% <0.00%> (ø)
cluster/state/helpers.go 32.35% <46.66%> (ø)
cluster/state/types.go 53.84% <53.84%> (ø)
cluster/state/mutation.go 70.58% <72.72%> (ø)
cluster/state/mutationlegacylock.go 61.44% <80.64%> (ø)

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Name string
Threshold int
DKGAlgorithm string
ForkVersion []byte
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: why not use Network string?

Copy link
Contributor Author

@corverroos corverroos May 12, 2023

Choose a reason for hiding this comment

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

I'm using the same cluster.Definition types

cluster/state/helpers.go Outdated Show resolved Hide resolved
@@ -85,7 +89,36 @@ func transformLegacyLock(_ Cluster, signed SignedMutation) (Cluster, error) {
return Cluster{}, errors.Wrap(err, "verify legacy lock")
}

// TODO(corver): Implement legacy lock transform.
lock := signed.Mutation.Data.(lockWrapper)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: check comma ok please, same as line 64-66 in the same file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

verify function already checks that type is correct, I'll add a comment

@corverroos corverroos added the merge when ready Indicates bulldozer bot may merge when all checks pass label May 12, 2023
@obol-bulldozer obol-bulldozer bot merged commit 0ee68ed into main May 12, 2023
@obol-bulldozer obol-bulldozer bot deleted the corver/clusterlegacy branch May 12, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants