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/fetcher: add support for DutySyncContribution #1355

Merged
merged 6 commits into from
Oct 27, 2022

Conversation

xenowits
Copy link
Contributor

Adds support for DutySyncContribution to fetcher.

category: feature
ticket: #1266

@codecov
Copy link

codecov bot commented Oct 26, 2022

Codecov Report

Base: 53.64% // Head: 53.67% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (d1923c8) compared to base (50dc83f).
Patch coverage: 38.84% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1355      +/-   ##
==========================================
+ Coverage   53.64%   53.67%   +0.03%     
==========================================
  Files         142      142              
  Lines       17265    17381     +116     
==========================================
+ Hits         9261     9329      +68     
- Misses       6714     6753      +39     
- Partials     1290     1299       +9     
Impacted Files Coverage Δ
core/dutydefinition.go 0.00% <ø> (ø)
core/signeddata.go 38.71% <0.00%> (-2.66%) ⬇️
eth2util/eth2exp/attagg_old.go 48.93% <42.30%> (-11.94%) ⬇️
core/fetcher/fetcher.go 62.79% <63.63%> (+0.35%) ⬆️
testutil/validatormock/attest.go 58.30% <100.00%> (ø)
core/qbft/qbft.go 81.11% <0.00%> (-0.86%) ⬇️
testutil/beaconmock/headproducer.go 53.65% <0.00%> (+0.81%) ⬆️
app/app.go 63.09% <0.00%> (+2.14%) ⬆️
app/vmock.go 77.00% <0.00%> (+2.67%) ⬆️
core/priority/prioritiser.go 68.39% <0.00%> (+6.73%) ⬆️

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.

eth2util/eth2exp/attagg_old.go Outdated Show resolved Hide resolved
eth2util/eth2exp/attagg_test.go Outdated Show resolved Hide resolved
eth2util/eth2exp/attagg_test.go Outdated Show resolved Hide resolved
core/signeddata.go Outdated Show resolved Hide resolved
core/fetcher/fetcher.go Outdated Show resolved Hide resolved
core/fetcher/fetcher.go Outdated Show resolved Hide resolved
core/fetcher/fetcher_test.go Outdated Show resolved Hide resolved
@xenowits xenowits self-assigned this Oct 27, 2022
@xenowits xenowits added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 27, 2022
@obol-bulldozer obol-bulldozer bot merged commit e4ca0a5 into main Oct 27, 2022
@obol-bulldozer obol-bulldozer bot deleted the xenowits/fetcher branch October 27, 2022 07:14
Comment on lines +816 to +821
data := altair.SyncAggregatorSelectionData{
Slot: s.Slot,
SubcommitteeIndex: uint64(s.SubcommitteeIndex),
}

return data.HashTreeRoot()
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be done inline:

        return altair.SyncAggregatorSelectionData{
		Slot:              s.Slot,
		SubcommitteeIndex: uint64(s.SubcommitteeIndex),
	}.HashTreeRoot()

@@ -807,6 +807,72 @@ func (s *BeaconCommitteeSelection) UnmarshalJSON(input []byte) error {
return s.BeaconCommitteeSelection.UnmarshalJSON(input)
}

// SyncCommitteeSelection wraps an eth2exp.SyncCommitteeSelection and implements SignedData.
type SyncCommitteeSelection struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

add type assertion on top of this file for this type

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.

None yet

3 participants