Remove dependency on swirlds-state-impl
from swirlds-platform-core
#16568
Labels
Platform
Tickets pertaining to the platform
This is a follow-up for #16322
PlatformMerkleStateRoot
extendsMerkleStateRoot
but it shouldn't really be the case because it unnecessarily creates a dependency on the implementation of thecom.swirlds.state.State
interface.What we do need is an implementation of
com.swirlds.platform.system.SwirldState
that contains an instance of thecom.swirlds.state.State
and instance ofcom.swirlds.platform.state.MerkleStateLifecycles
. Then, it should have the implementation ofSwirldState
interface methods that looks as follows:and so on. Then this implementation should replace usages of
PlatformMerkleStateRoot
, andPlatformMerkleStateRoot
, in its turn, should be removed.This refactoring will allow to get rid of
swirlds-state-impl
dependency. The common wisdom is that whilst app can depend on the implementation details of the state (and therefore the module), the platform has absolutely to reason for this dependency.The text was updated successfully, but these errors were encountered: