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: add signed and unsigned types for sync duties #1202

Merged
merged 3 commits into from
Sep 30, 2022

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Sep 29, 2022

Adds signed and unsigned types for sync committee duties.

category: feature
ticket: #1177

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Base: 53.33% // Head: 52.83% // Decreases project coverage by -0.50% ⚠️

Coverage data is based on head (56cef5b) compared to base (8a0e938).
Patch coverage: 55.88% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1202      +/-   ##
==========================================
- Coverage   53.33%   52.83%   -0.51%     
==========================================
  Files         133      133              
  Lines       15505    15648     +143     
==========================================
- Hits         8269     8267       -2     
- Misses       6045     6185     +140     
- Partials     1191     1196       +5     
Impacted Files Coverage Δ
core/dutydefinition.go 0.00% <0.00%> (ø)
core/signeddata.go 40.88% <65.21%> (+2.35%) ⬆️
core/unsigneddata.go 47.41% <72.72%> (+1.37%) ⬆️
core/qbft/qbft.go 71.67% <0.00%> (-9.88%) ⬇️
testutil/beaconmock/beaconmock.go 52.33% <0.00%> (-5.40%) ⬇️
app/vmock.go 69.93% <0.00%> (-1.97%) ⬇️
app/eth2wrap/eth2wrap_gen.go 4.83% <0.00%> (-0.86%) ⬇️
core/scheduler/scheduler.go 74.06% <0.00%> (+0.53%) ⬆️
dkg/transport.go 66.66% <0.00%> (+12.96%) ⬆️

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.

Comment on lines +555 to +557
size := 128
index := rand.Intn(size)
resp := bitfield.NewBitvector128()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
size := 128
index := rand.Intn(size)
resp := bitfield.NewBitvector128()
var (
size = 128
index = rand.Intn(size)
resp = bitfield.NewBitvector128()
)

return &altair.SyncCommitteeContribution{
Slot: RandomSlot(),
BeaconBlockRoot: RandomRoot(),
SubcommitteeIndex: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

why not a random index?

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


func RandomSyncContributionAndProof() *altair.ContributionAndProof {
return &altair.ContributionAndProof{
AggregatorIndex: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

why not a random index? Like

AggregatorIndex: rand.Uint64()

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

@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Sep 30, 2022
@dB2510 dB2510 linked an issue Sep 30, 2022 that may be closed by this pull request
@obol-bulldozer obol-bulldozer bot merged commit 33af064 into main Sep 30, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/synctypes branch September 30, 2022 08: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.

Add core.SignedData implementation for sync committee types
2 participants