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

core/validatorapi: add sync committee duties to validatorapi #1278

Merged
merged 3 commits into from
Oct 13, 2022

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Oct 13, 2022

Adds support for sync committee duties to validatorapi.

category: feature
ticket: #1261

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Base: 53.78% // Head: 53.87% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (db0403c) compared to base (bffcbb5).
Patch coverage: 51.35% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
+ Coverage   53.78%   53.87%   +0.08%     
==========================================
  Files         139      139              
  Lines       16457    16486      +29     
==========================================
+ Hits         8852     8882      +30     
+ Misses       6342     6338       -4     
- Partials     1263     1266       +3     
Impacted Files Coverage Δ
testutil/beaconmock/options.go 32.78% <0.00%> (-0.28%) ⬇️
core/validatorapi/validatorapi.go 56.80% <50.00%> (+0.84%) ⬆️
core/validatorapi/router.go 63.28% <57.14%> (+0.31%) ⬆️
core/validatorapi/eth2types.go 50.00% <100.00%> (ø)
app/vmock.go 71.89% <0.00%> (-1.97%) ⬇️
core/priority/prioritiser.go 63.73% <0.00%> (-1.04%) ⬇️
core/dutydb/memory.go 67.22% <0.00%> (+0.84%) ⬆️
core/qbft/qbft.go 81.97% <0.00%> (+0.85%) ⬆️
app/peerinfo/peerinfo.go 78.84% <0.00%> (+4.80%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


// syncCommitteeDutiesRequest defines the request to the getSyncCommitteeDuties endpoint.
// See https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/getSyncCommitteeDuties.
type syncCommitteeDutiesRequest []eth2p0.ValidatorIndex
Copy link
Contributor

Choose a reason for hiding this comment

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

rather just rename attesterDutiesRequest to valIndexesJSON and re-use that type.

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

}

if len(data) == 0 {
data = []*eth2v1.SyncCommitteeDuty{}
Copy link
Contributor

Choose a reason for hiding this comment

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

is this really required? why isn't nil fine?

}

// Replace root public keys with public shares.
for i := 0; i < len(duties); i++ {
Copy link
Contributor

Choose a reason for hiding this comment

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

no test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 13, 2022
@obol-bulldozer obol-bulldozer bot merged commit ae58e76 into main Oct 13, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/syncduties branch October 13, 2022 15:07
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.

2 participants