hiero-ledger / hiero-ledger/hiero-consensus-node

Get all states for each service

Open
#22,873 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

In mirror node, we use `hedera-app` library as a dependency and we need to register all states that are needed for each service in order to implement our custom state and use it in our code. We used implementations of `ServiceMigrator` and `SchemaRegistry` in the past but this way we used too much classes from `hedera-app` and they were updated frequently and we needed to make many manual changes on each library bump. Now we register all states manually in order avoid this issue. However, this is very error prone and it is easy to accidentally miss some newly defined state.

Could you please provide some easy way to get all states for each service? For example, what could work for us is some static method or a static field in each service. I say "static" because otherwise we will need to make instances of the services and this will make the code dependent of classes and interfaces from `hedera-app` and this will lead to the initial issue. I am open to other suggestions as well. Let me know if you need more information.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing ServiceMigrator and SchemaRegistry implementations, then compare them with the mirror node's manually registered states for each service. The change is complete when mirror node code can obtain every state for each service without instantiating service classes or depending on frequently changing hedera-app internals.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.