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

Generic data prims EngineSyncEvent #12824

Closed
Tracked by #12578
emhane opened this issue Nov 24, 2024 · 1 comment · Fixed by #12827
Closed
Tracked by #12578

Generic data prims EngineSyncEvent #12824

emhane opened this issue Nov 24, 2024 · 1 comment · Fixed by #12827
Assignees
Labels
A-sdk Related to reth's use as a library C-debt A clean up/refactor of existing code D-good-first-issue Nice and easy! A great choice to get started

Comments

@emhane
Copy link
Member

emhane commented Nov 24, 2024

Describe the feature

Make EngineSyncEvent generic over data primitives, with reth_primitives::EthPrimitives as default generic, as EngineSyncEvent<N: NodePrimitives = reth_primitives::EthPrimitives>. Update the use of SealedBlock with SealedBlock<N::BlockHeader, N::BlockBody>.

/// The event type emitted by the [`EngineSyncController`].
#[derive(Debug)]
pub(crate) enum EngineSyncEvent {
/// A full block has been downloaded from the network.
FetchedFullBlock(SealedBlock),
/// Pipeline started syncing
///
/// This is none if the pipeline is triggered without a specific target.
PipelineStarted(Option<PipelineTarget>),
/// Pipeline finished
///
/// If this is returned, the pipeline is idle.
PipelineFinished {
/// Final result of the pipeline run.
result: Result<ControlFlow, PipelineError>,
/// Whether the pipeline reached the configured `max_block`.
///
/// Note: this is only relevant in debugging scenarios.
reached_max_block: bool,
},
/// Pipeline task was dropped after it was started, unable to receive it because channel
/// closed. This would indicate a panicked pipeline task
PipelineTaskDropped,
}

Additional context

No response

@emhane emhane added A-sdk Related to reth's use as a library C-debt A clean up/refactor of existing code D-good-first-issue Nice and easy! A great choice to get started labels Nov 24, 2024
@htiennv
Copy link
Contributor

htiennv commented Nov 24, 2024

Hi, i would like to take this issue. Thanks @emhane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sdk Related to reth's use as a library C-debt A clean up/refactor of existing code D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants