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 head producer to beaconmock #1307

Closed
dB2510 opened this issue Oct 18, 2022 · 0 comments · Fixed by #1308
Closed

Add head producer to beaconmock #1307

dB2510 opened this issue Oct 18, 2022 · 0 comments · Fixed by #1308
Assignees

Comments

@dB2510
Copy link
Contributor

dB2510 commented Oct 18, 2022

Problem to be solved

While adding support for DutySyncMessage to simnet we found that some VCs use head events stream to get head beacon block root. We need to add support for server side events to beaconmock to serve head events to VCs on simnet.

Proposed solution

  • Add a HeadProducer stateful struct in beaconmock.
  • It should update head based on a slot ticker (refer: scheduler for a slot ticker).
  • When it receives a slot tick, it calculates a new head event and caches it as "current head" in state.
  • It also pushes head event to all event subscribers.
  • When GET "/eth/v1/beacon/blocks/{block_id}/root" is called it should return "current head" from state.

Out of Scope

None

@dB2510 dB2510 self-assigned this Oct 18, 2022
@dB2510 dB2510 linked a pull request Oct 18, 2022 that will close this issue
@dB2510 dB2510 changed the title Add block producer to beaconmock Add head producer to beaconmock Oct 19, 2022
obol-bulldozer bot pushed a commit that referenced this issue Oct 19, 2022
Adds head producer to beaconmock.

category: feature
ticket: #1307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant