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

feat(sidecar): added driver on higher register (tokio::select) #181

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

merklefruit
Copy link
Collaborator

@merklefruit merklefruit commented Aug 2, 2024

This PR introduces a refactor of the sidecar binary to streamline all components that go in the initialization and event loop phase of operating the sidecar.

In particular, this implementation differs from what attempted in #133 in not using a manual Future but instead still relying on tokio::select! to progress the loop. This simplifies things a lot, because of the following async tasks:

  1. updating the consensus and execution head is an async operation (it requires fetching from both EL and CL)
  2. validating the execution state of a request is an async operation (it requires fetching state from the EL)

This could be overcome in the future by transforming the ExecutionState and ConsensusState containers into actors with their own loops to respond to requests in channels instead of awaiting.

@merklefruit merklefruit changed the title feat: added sidecar driver on higher register (tokio::select) feat(sidecar): added driver on higher register (tokio::select) Aug 2, 2024
Copy link
Contributor

@thedevbirb thedevbirb left a comment

Choose a reason for hiding this comment

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

Thanks for the refactor! Very needed :)

@merklefruit merklefruit merged commit 1c01e7b into unstable Aug 5, 2024
2 checks passed
@merklefruit merklefruit deleted the nico/feat/sidecar-driver branch August 5, 2024 10:54
@merklefruit merklefruit mentioned this pull request Aug 5, 2024
Copy link
Contributor

@namn-grg namn-grg left a comment

Choose a reason for hiding this comment

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

Great work ser! Love this refactor!

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 this pull request may close these issues.

3 participants