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

testutil/beaconmock: add head producer #1308

Merged
merged 8 commits into from
Oct 19, 2022
Merged

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Oct 18, 2022

Adds head producer to beaconmock.

category: feature
ticket: #1307

@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Base: 53.45% // Head: 53.44% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (79e1e50) compared to base (2513b91).
Patch coverage: 55.27% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1308      +/-   ##
==========================================
- Coverage   53.45%   53.44%   -0.01%     
==========================================
  Files         141      142       +1     
  Lines       16944    16919      -25     
==========================================
- Hits         9058     9043      -15     
+ Misses       6608     6602       -6     
+ Partials     1278     1274       -4     
Impacted Files Coverage Δ
app/eth2wrap/eth2wrap.go 61.00% <0.00%> (ø)
app/eth2wrap/eth2wrap_gen.go 4.86% <ø> (ø)
app/eth2wrap/httpwrap.go 0.00% <0.00%> (ø)
core/bcast/bcast.go 69.60% <0.00%> (-2.89%) ⬇️
core/dutydefinition.go 0.00% <ø> (ø)
core/scheduler/scheduler.go 72.94% <0.00%> (ø)
core/validatorapi/eth2types.go 50.00% <ø> (ø)
testutil/validatormock/synccomm.go 0.00% <0.00%> (ø)
core/tracker/tracker.go 70.14% <25.00%> (ø)
testutil/beaconmock/beaconmock.go 50.00% <36.36%> (-1.38%) ⬇️
... and 23 more

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.

return &BlockProducer{server: server}
}

// BlockProducer is stateful structure for providing deterministic block roots based on slot events.
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
// BlockProducer is stateful structure for providing deterministic block roots based on slot events.
// BlockProducer is a stateful struct for providing deterministic block roots based on slot events.

@dB2510 dB2510 linked an issue Oct 18, 2022 that may be closed by this pull request
@dB2510 dB2510 changed the title testutil/beaconmock: add block producer testutil/beaconmock: add head producer Oct 18, 2022
testutil/beaconmock/headproducer.go Fixed Show resolved Hide resolved
mock.overrides = append(mock.overrides, staticOverride{
Endpoint: "/eth/v1/config/spec",
Key: "EPOCHS_PER_SYNC_COMMITTEE_PERIOD",
Value: "2",
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be 1?

return err
}

log.Info(ctx, "Mock sync committee msg submitted", z.Int("slot", int(slot)), z.Str("root", hex.EncodeToString(blockRoot[:])))
Copy link
Contributor

Choose a reason for hiding this comment

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

remove root, it isn't human understandable

testutil/beaconmock/headproducer.go Fixed Show resolved Hide resolved
@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 19, 2022
@obol-bulldozer obol-bulldozer bot merged commit 7f8be47 into main Oct 19, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/blockproducer branch October 19, 2022 09:57
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 head producer to beaconmock
3 participants