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

chore: removal of the BlockNodeContext object #629

Open
ata-nas opened this issue Feb 10, 2025 · 0 comments
Open

chore: removal of the BlockNodeContext object #629

ata-nas opened this issue Feb 10, 2025 · 0 comments
Labels
Block Node Issues/PR related to the Block Node.

Comments

@ata-nas
Copy link
Contributor

ata-nas commented Feb 10, 2025

Persona

As a Block Node Developer

Request

I want to drop the usage of the BlockNodeContext

Goal

So that I can remove redundant complexity of the context which is only used to do DI

Technical Notes

Currently there exist a BlockNodeContext object that is wired with the Dagger DI. The context has currently only a reference to the MetricsService and the Configuration class and is only used to do DI of the metrics service and the configuration.
The configuration for any given type is in some places still acquired via the Configuration object, which contradicts other usages, so it is a deprecated usage that should be removed.
The metrics service has no real reason to be injected via the context object.
This refactor will improve a lot of redundant and wrongful usages we currently have and clean up a lot the current DI wiring.

We need to:

  • drop the BlockNodeContext object
  • all places that require the metrics service should simply get it via DI
  • all places that require a specific type of configuration should get it via DI
  • if there are any Configuration specific types that are needed to be injected, but are not provided via Dagger, need to be now provided via Dagger
@ata-nas ata-nas added the Block Node Issues/PR related to the Block Node. label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block Node Issues/PR related to the Block Node.
Projects
None yet
Development

No branches or pull requests

1 participant