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

Avoid using concrete ProviderFactory #10797

Closed
Tracked by #11242
klkvr opened this issue Sep 9, 2024 · 0 comments
Closed
Tracked by #11242

Avoid using concrete ProviderFactory #10797

klkvr opened this issue Sep 9, 2024 · 0 comments
Assignees
Labels
C-enhancement New feature or request

Comments

@klkvr
Copy link
Collaborator

klkvr commented Sep 9, 2024

Describe the feature

We're currently using concrete ProviderFactory to obtain DB providers in node components. This results in any generics of database provider implementations leaking into all types requiring DB access. Additionaly this affects compie times as we're becoming bottlenecked on reth-provider crate.

We can slightly change DatabaseProviderFactory trait and use it instead of ProviderFactory:

pub trait DatabaseProviderFactory<DB: Database> {
/// Create new read-only database provider.
fn database_provider_ro(&self) -> ProviderResult<DatabaseProviderRO<DB>>;
}

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants