-
Notifications
You must be signed in to change notification settings - Fork 90
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
validatormock: integrate DutyPrepareSyncContribution
#1384
Conversation
func (s *SyncCommMember) Aggregate(ctx context.Context, slot eth2p0.Slot) error { | ||
wait(ctx, s.getSelectionsOK(slot)) | ||
wait(ctx, s.dutiesOK, s.getSelectionsOK(slot)) | ||
// TODO(xenowits): Add aggregate function. |
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.
It will be addressed in this ticket
847c633
to
179f6a0
Compare
Codecov ReportBase: 54.15% // Head: 53.66% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1384 +/- ##
==========================================
- Coverage 54.15% 53.66% -0.49%
==========================================
Files 144 144
Lines 17804 17860 +56
==========================================
- Hits 9641 9584 -57
- Misses 6836 6950 +114
+ Partials 1327 1326 -1
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. |
testutil/validatormock/synccomm.go
Outdated
) (syncSelections, error) { | ||
return nil, nil | ||
// prepareSubcommittees returns the assignment of validators to sync subcommittees. It assumes that all validators are included in all sync subnets (subcommittees). | ||
func prepareSubcommittees(ctx context.Context, eth2Cl eth2wrap.Client, duties syncDuties) (subCommittees, error) { |
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.
I think we should use the SyncCommitteeDuty.ValidatorSyncCommitteeIndices
field.
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.
yeah
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.
remove this method, you can get the subcommittees from the duty directly in prepareSyncSelections
testutil/validatormock/synccomm.go
Outdated
// ]) | ||
// . We can infer that the validator is assigned to two subnets (subcommittees), zero and three since: subnets = [40 / 128, 450 / 128 ] = [0, 3]. | ||
|
||
for _, commIdx := range duty.ValidatorSyncCommitteeIndices { |
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.
testutil/validatormock/synccomm.go
Outdated
) (syncSelections, error) { | ||
return nil, nil | ||
// getSubcommittees returns the subcommittee indexes for the provided sync committee duty. | ||
func getSubcommittees(ctx context.Context, eth2Cl eth2client.SpecProvider, duty eth2v1.SyncCommitteeDuty) ([]eth2p0.CommitteeIndex, error) { |
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.
nit, move this below prepareSyncSelections
Integrate
DutyPrepareSyncContribution
into validatormock.category: feature
ticket: #1262