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

Add v2 attestation aggregation interface #1061

Closed
dB2510 opened this issue Aug 31, 2022 · 0 comments · Fixed by #1073
Closed

Add v2 attestation aggregation interface #1061

dB2510 opened this issue Aug 31, 2022 · 0 comments · Fixed by #1073
Assignees
Labels
duties This issue is related to duties to be added enhancement New feature or request

Comments

@dB2510
Copy link
Contributor

dB2510 commented Aug 31, 2022

Problem to be solved

We are planning to add attestation aggregation duty which will require changes in go-eth2-client package which we use as types and interfaces for calling a beacon client. Before making changes in go-eth2-client repo we need to test attestation aggregation on our side.

Proposed solution

  • Create an experimental sub-package as eth2exp in eth2util package where we will add all the types required to support aggregation duties until go-eth2-client supports them.
  • Add v2 BeaconCommitteeSubscriptionsSubmitter interface to eth2util/eth2exp package. Add a TODO: should be removed once it is added to go-eth2-client. Refer design doc for interface and structs.
  • Add the above interface to eth2wrap and beaconmock.
  • Add SubmitBeaconCommitteeSubscriptionsFunc to Mock struct in testutil/beaconmock.go which will be called by SubmitBeaconCommitteeSubscriptions method of Mock. Add following Option func to testutil/options.go:
func WithAttestationAggregation(aggregators map[eth2p0.Slot]eth2p0.ValidatorIndex) Option {
	return func(mock *Mock) {
		mock.SubmitBeaconCommitteeSubscriptionsFunc = func(ctx context.Context, subscriptions []*apiv2.BeaconCommitteeSubscription) ([]apiv2.BeaconCommitteeSubscriptionResponse, error) {
		}
	}
}

which will return response based on the aggregators map for the given slot and validator index.

  • Add unit tests
@dB2510 dB2510 added the duties This issue is related to duties to be added label Aug 31, 2022
@dB2510 dB2510 modified the milestone: Devnet 1 Aug 31, 2022
@dB2510 dB2510 added the enhancement New feature or request label Sep 4, 2022
obol-bulldozer bot pushed a commit that referenced this issue Sep 5, 2022
…eth2wrap (#1073)

Adds BeaconCommitteeSubscriptionsSubmitter interface to eth2wrap and beaconmock.

category: feature
ticket: #1061
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duties This issue is related to duties to be added enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant