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

swirlds-state-api module should not depend on Hedera node HAPI module #15623

Open
Tracked by #15574
artemananiev opened this issue Sep 30, 2024 · 0 comments
Open
Tracked by #15574
Assignees
Labels
Platform Tickets pertaining to the platform Tech Debt Reduced Issues which reduce technical debt.

Comments

@artemananiev
Copy link
Member

Current module-info.java in platform-sdk/swirlds-state-api:

module com.swirlds.state.api {
    ... 
    requires transitive com.hedera.node.hapi;
    requires transitive com.swirlds.common;
    requires transitive com.swirlds.config.api;
    requires transitive com.swirlds.merkle;
    requires transitive com.swirlds.virtualmap;
    requires transitive com.hedera.pbj.runtime;
    requires com.swirlds.fcqueue;
    requires com.swirlds.logging;
    requires com.swirlds.merkledb;
    requires org.apache.logging.log4j;
    requires static transitive com.github.spotbugs.annotations;
}

As far as I can see, this dependency on com.hedera.node.hapi is for three reasons:

  • SemanticVersion class
  • Printing detailed information about keys in StateLogger
  • NodeInfo.getAccountId() method

SemanticVersion can probably moved to swirlds-state-api or even swirlds-common. StateLogger can be simplified to utilize keys' toString() method or alike. The only real usage is in NodeInfo, which is in turn used from NetworkInfo. These classes are used in Hedera app code only, they aren't needed in platform code.

This ticket is to check if this dependency is really needed or can be removed.

@artemananiev artemananiev added Tech Debt Reduced Issues which reduce technical debt. Platform Tickets pertaining to the platform labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Tickets pertaining to the platform Tech Debt Reduced Issues which reduce technical debt.
Projects
None yet
Development

No branches or pull requests

2 participants