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

cmd/createdkg: verify enr in create dkg #757

Merged
merged 2 commits into from
Jul 2, 2022
Merged

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Jun 30, 2022

Verifies operator ENRs to be in standard form at the start of create dkg. Also make frost dkg as the default one.

category: refactor
ticket: #752

@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #757 (d4ca54c) into main (a2e36f6) will decrease coverage by 0.18%.
The diff coverage is 72.72%.

@@            Coverage Diff             @@
##             main     #757      +/-   ##
==========================================
- Coverage   54.57%   54.38%   -0.19%     
==========================================
  Files         107      107              
  Lines       10478    10485       +7     
==========================================
- Hits         5718     5702      -16     
- Misses       3919     3936      +17     
- Partials      841      847       +6     
Impacted Files Coverage Δ
p2p/enr.go 71.42% <25.00%> (-10.93%) ⬇️
cmd/createdkg.go 40.00% <100.00%> (+40.00%) ⬆️
dkg/dkg.go 48.15% <100.00%> (ø)
core/qbft/qbft.go 71.67% <0.00%> (-10.31%) ⬇️
app/app.go 58.50% <0.00%> (+0.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2e36f6...d4ca54c. Read the comment docs.

@dB2510 dB2510 linked an issue Jun 30, 2022 that may be closed by this pull request
cmd/createdkg.go Outdated
for i, opENR := range conf.OperatorENRs {
_, err := p2p.DecodeENR(opENR)
if err != nil {
return errors.Wrap(err, fmt.Sprintf("invalid ENR of operator %d", i))
Copy link
Contributor

Choose a reason for hiding this comment

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

you should just be able to use z.Int("index",i)) instead of fmt.Sprintf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@corverroos corverroos left a comment

Choose a reason for hiding this comment

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

One or two small tests would be awesome

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jul 2, 2022
@obol-bulldozer obol-bulldozer bot merged commit 616f4da into main Jul 2, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/verifyenr branch July 2, 2022 19:09
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.

create dkg doensn't verify ENRs
2 participants