From 7cd87dbc6cb51c86a4d0f604802ce6bcd50a2554 Mon Sep 17 00:00:00 2001 From: Ivan Malygin Date: Wed, 6 Nov 2024 12:21:35 -0500 Subject: [PATCH] chore: 16221 `swirlds-state-impl` module (#16379) Signed-off-by: Ivan Malygin Co-authored-by: Michael Tinker --- .../impl/AddressBookServiceImpl.java | 2 +- .../impl/schemas/V053AddressBookSchema.java | 6 ++-- .../impl/test/AddressBookServiceImplTest.java | 2 +- .../schemas/V053AddressBookSchemaTest.java | 6 ++-- .../com/hedera/node/app/spi/AppContext.java | 3 +- .../com/hedera/node/app/spi/RpcService.java | 2 +- .../node/app/spi/workflows/HandleContext.java | 5 ++- .../node/app/spi/workflows/SystemContext.java | 2 +- .../hedera/node/app/spi/state/SchemaTest.java | 2 +- .../app/spi/state/StateDefinitionTest.java | 2 +- .../node/app/spi/fixtures/TestService.java | 6 ++-- .../spi/fixtures/info/FakeNetworkInfo.java | 4 +-- hedera-node/hedera-app/build.gradle.kts | 1 + .../blocks/BlockStreamManagerBenchmark.java | 2 +- .../app/blocks/StandaloneRoundManagement.java | 2 +- .../main/java/com/hedera/node/app/Hedera.java | 2 +- .../node/app/HederaInjectionComponent.java | 4 +-- .../node/app/blocks/BlockStreamModule.java | 2 +- .../node/app/blocks/BlockStreamService.java | 4 +-- .../app/blocks/impl/FileBlockItemWriter.java | 4 +-- .../schemas/V0560BlockStreamSchema.java | 6 ++-- .../com/hedera/node/app/fees/FeeService.java | 4 +-- .../node/app/fees/schemas/V0490FeeSchema.java | 6 ++-- .../hedera/node/app/ids/EntityIdService.java | 4 +-- .../app/ids/schemas/V0490EntityIdSchema.java | 6 ++-- .../node/app/info/GenesisNetworkInfo.java | 4 +-- .../node/app/info/InfoInjectionModule.java | 2 +- .../hedera/node/app/info/NodeInfoImpl.java | 2 +- .../node/app/info/StateNetworkInfo.java | 4 +-- .../node/app/info/UnavailableNetworkInfo.java | 4 +-- .../node/app/records/BlockRecordService.java | 4 +-- .../formats/BlockRecordWriterFactoryImpl.java | 2 +- .../formats/v6/BlockRecordWriterV6.java | 4 +-- .../schemas/V0490BlockRecordSchema.java | 6 ++-- .../schemas/V0560BlockRecordSchema.java | 4 +-- .../hedera/node/app/roster/RosterService.java | 4 +-- .../app/services/MigrationContextImpl.java | 4 +-- .../app/services/OrderedServiceMigrator.java | 6 ++-- .../node/app/services/ServiceMigrator.java | 2 +- .../node/app/services/ServicesRegistry.java | 4 +-- .../app/services/ServicesRegistryImpl.java | 2 +- .../state/logging/TransactionStateLogger.java | 2 +- .../state/merkle/MerkleSchemaRegistry.java | 12 +++---- .../state/merkle/SchemaApplicationType.java | 2 +- .../app/state/merkle/SchemaApplications.java | 2 +- .../node/app/state/merkle/VersionUtils.java | 2 +- .../state/recordcache/RecordCacheImpl.java | 2 +- .../state/recordcache/RecordCacheService.java | 4 +-- .../schemas/V0490RecordCacheSchema.java | 6 ++-- .../schemas/V0540RecordCacheSchema.java | 6 ++-- .../throttle/CongestionThrottleService.java | 4 +-- .../V0490CongestionThrottleSchema.java | 6 ++-- .../hedera/node/app/tss/TssBaseService.java | 2 +- .../node/app/tss/TssBaseServiceImpl.java | 2 +- .../app/tss/schemas/V0560TssBaseSchema.java | 4 +-- .../app/version/HederaSoftwareVersion.java | 6 ++-- .../app/version/ServicesSoftwareVersion.java | 6 ++-- .../node/app/workflows/handle/Dispatch.java | 4 +-- .../handle/DispatchHandleContext.java | 4 +-- .../workflows/handle/DispatchProcessor.java | 2 +- .../app/workflows/handle/HandleWorkflow.java | 6 ++-- .../app/workflows/handle/RecordDispatch.java | 2 +- .../handle/dispatch/ChildDispatchFactory.java | 4 +-- .../workflows/handle/record/SystemSetup.java | 2 +- .../app/workflows/handle/steps/UserTxn.java | 2 +- .../handle/steps/UserTxnFactory.java | 4 +-- .../handle/throttle/DispatchUsageManager.java | 2 +- .../prehandle/PreHandleWorkflow.java | 2 +- .../impl/StandaloneDispatchFactory.java | 4 +-- .../standalone/impl/StandaloneModule.java | 2 +- .../impl/StandaloneNetworkInfo.java | 4 +-- .../hedera-app/src/main/java/module-info.java | 1 + .../app/blocks/BlockStreamServiceTest.java | 2 +- .../blocks/impl/FileBlockItemWriterTest.java | 2 +- .../schemas/V0560BlockStreamSchemaTest.java | 2 +- .../app/components/IngestComponentTest.java | 2 +- .../node/app/roster/RosterServiceTest.java | 4 +-- .../roster/schemas/V0540RosterSchemaTest.java | 4 +-- .../app/services/ServiceRegistryImplTest.java | 2 +- .../state/merkle/DependencyMigrationTest.java | 12 +++---- .../merkle/MerkleSchemaRegistryTest.java | 8 ++--- .../state/merkle/SchemaApplicationsTest.java | 4 +-- .../app/state/merkle/SerializationTest.java | 8 ++--- .../app/state/merkle/StateMetadataTest.java | 4 +-- .../app/state/merkle/disk/OnDiskTest.java | 4 +-- .../recordcache/RecordCacheImplTest.java | 4 +-- .../recordcache/RecordCacheServiceTest.java | 4 +-- .../schemas/V0540RecordCacheSchemaTest.java | 4 +-- .../node/app/test/grpc/GrpcTestBase.java | 2 +- .../node/app/tss/TssBaseServiceImplTest.java | 2 +- .../node/app/tss/TssBaseServiceTest.java | 2 +- .../app/tss/TssCryptographyManagerTest.java | 2 +- .../tss/handlers/TssMessageHandlerTest.java | 4 +-- .../app/tss/handlers/TssSubmissionsTest.java | 4 +-- .../app/tss/handlers/TssVoteHandlerTest.java | 2 +- .../app/tss/schemas/V0560TSSSchemaTest.java | 2 +- .../handle/DispatchHandleContextTest.java | 4 +-- .../handle/DispatchProcessorTest.java | 2 +- .../workflows/handle/HandleWorkflowTest.java | 4 +-- .../dispatch/ChildDispatchFactoryTest.java | 4 +-- .../dispatch/ValidationReporterTest.java | 2 +- .../handle/record/BlockRecordManagerTest.java | 2 +- .../handle/record/BlockRecordServiceTest.java | 8 ++--- .../formats/v6/BlockRecordWriterV6Test.java | 2 +- .../workflows/handle/steps/UserTxnTest.java | 4 +-- .../throttle/DispatchUsageManagerTest.java | 4 +-- .../standalone/TransactionExecutorsTest.java | 4 +-- .../hedera/node/app/fixtures/AppTestBase.java | 6 ++-- .../fixtures/state/FakeSchemaRegistry.java | 8 ++--- .../fixtures/state/FakeServiceMigrator.java | 2 +- .../fixtures/state/FakeServicesRegistry.java | 2 +- .../consensus/impl/ConsensusServiceImpl.java | 2 +- .../impl/schemas/V0490ConsensusSchema.java | 6 ++-- .../impl/test/ConsensusServiceImplTest.java | 2 +- .../schemas/V0490ConsensusSchemaTest.java | 2 +- .../service/file/impl/FileServiceImpl.java | 2 +- .../impl/handlers/FileGetContentsHandler.java | 2 +- .../file/impl/schemas/V0490FileSchema.java | 8 ++--- .../file/impl/test/FileServiceImplTest.java | 6 ++-- .../handlers/FileGetContentsHandlerTest.java | 2 +- .../file/ReadableUpgradeFileStore.java | 2 +- .../networkadmin/impl/FreezeServiceImpl.java | 2 +- .../networkadmin/impl/NetworkServiceImpl.java | 2 +- .../impl/schemas/V0490FreezeSchema.java | 6 ++-- .../impl/schemas/V0490NetworkSchema.java | 2 +- .../impl/test/FreezeServiceImplTest.java | 8 ++--- .../impl/test/NetworkServiceImplTest.java | 2 +- .../handlers/NetworkAdminHandlerTestBase.java | 2 +- .../test/schemas/V0490FreezeSchemaTest.java | 2 +- .../schedule/impl/ScheduleServiceImpl.java | 2 +- .../impl/schemas/V0490ScheduleSchema.java | 6 ++-- .../impl/schemas/V0570ScheduleSchema.java | 6 ++-- .../impl/ScheduleServiceImplTest.java | 6 ++-- .../impl/schemas/V0490ScheduleSchemaTest.java | 4 +-- .../impl/schemas/V0570ScheduleSchemaTest.java | 4 +-- .../contract/impl/ContractServiceImpl.java | 2 +- .../contract/impl/exec/TransactionModule.java | 2 +- .../impl/infra/HevmTransactionFactory.java | 2 +- .../impl/schemas/V0490ContractSchema.java | 6 ++-- .../impl/schemas/V0500ContractSchema.java | 4 +-- .../impl/test/ContractServiceImplTest.java | 4 +-- .../impl/test/exec/TransactionModuleTest.java | 2 +- .../infra/HevmTransactionFactoryTest.java | 2 +- .../test/schemas/V0500ContractSchemaTest.java | 2 +- .../service/token/impl/TokenServiceImpl.java | 2 +- .../token/impl/api/TokenServiceApiImpl.java | 2 +- .../handlers/staking/StakeInfoHelper.java | 4 +-- .../token/impl/schemas/V0490TokenSchema.java | 6 ++-- .../token/impl/schemas/V0500TokenSchema.java | 4 +-- .../token/impl/schemas/V0530TokenSchema.java | 6 ++-- .../impl/validators/StakingValidator.java | 2 +- .../token/impl/TokenServiceImplTest.java | 4 +-- .../test/api/TokenServiceApiImplTest.java | 2 +- .../handlers/CryptoCreateHandlerTest.java | 4 +-- .../handlers/CryptoUpdateHandlerTest.java | 4 +-- .../test/schemas/V0490TokenSchemaTest.java | 4 +-- .../test/schemas/V0500TokenSchemaTest.java | 2 +- .../test/schemas/V0530TokenSchemaTest.java | 2 +- .../service/token/api/TokenServiceApi.java | 2 +- .../node/app/service/util/UtilService.java | 2 +- .../embedded/fakes/FakeTssBaseService.java | 2 +- .../block/StateChangesValidator.java | 2 +- .../swirlds-platform-core/build.gradle.kts | 1 + .../DefaultEventSignatureValidator.java | 2 +- .../state/iss/DefaultIssDetector.java | 2 +- .../state/service/PlatformStateService.java | 6 ++-- .../schemas/V0540PlatformStateSchema.java | 6 ++-- .../service/schemas/V0540RosterSchema.java | 6 ++-- .../DefaultBirthRoundMigrationShim.java | 2 +- .../src/main/java/module-info.java | 1 + .../platform/state/MerkleStateRootTest.java | 2 +- .../service/PlatformStateServiceTest.java | 4 +-- .../state/FakeMerkleStateLifecycles.java | 4 +-- .../test/fixtures/state/MerkleTestBase.java | 2 +- .../test/fixtures/state/TestSchema.java | 6 ++-- .../src/testFixtures/java/module-info.java | 4 ++- .../swirlds-state-api/build.gradle.kts | 4 ++- .../state/{spi => lifecycle}/HapiUtils.java | 2 +- .../{spi => lifecycle}/MigrationContext.java | 6 ++-- .../state/{spi => lifecycle}/Schema.java | 4 ++- .../{spi => lifecycle}/SchemaRegistry.java | 2 +- .../state/{spi => lifecycle}/Service.java | 2 +- .../{spi => lifecycle}/StateDefinition.java | 3 +- .../{spi => lifecycle}/info/NetworkInfo.java | 2 +- .../{spi => lifecycle}/info/NodeInfo.java | 2 +- .../swirlds/state/spi/ReadableKVState.java | 5 +-- .../src/main/java/module-info.java | 12 ++----- .../src/testFixtures/java/module-info.java | 9 ----- .../swirlds-state-impl/build.gradle.kts | 35 +++++++++++++++++++ .../swirlds/state/merkle/StateMetadata.java | 4 +-- .../com/swirlds/state/merkle/StateUtils.java | 0 .../state/merkle/disk/OnDiskIterator.java | 0 .../swirlds/state/merkle/disk/OnDiskKey.java | 0 .../merkle/disk/OnDiskKeySerializer.java | 0 .../merkle/disk/OnDiskReadableKVState.java | 0 .../state/merkle/disk/OnDiskValue.java | 0 .../merkle/disk/OnDiskValueSerializer.java | 0 .../merkle/disk/OnDiskWritableKVState.java | 0 .../state/merkle/logging/StateLogger.java | 0 .../state/merkle/memory/InMemoryKey.java | 0 .../memory/InMemoryReadableKVState.java | 0 .../state/merkle/memory/InMemoryValue.java | 0 .../memory/InMemoryWritableKVState.java | 0 .../swirlds/state/merkle/queue/QueueNode.java | 0 .../merkle/queue/ReadableQueueStateImpl.java | 0 .../merkle/queue/WritableQueueStateImpl.java | 0 .../singleton/ReadableSingletonStateImpl.java | 0 .../state/merkle/singleton/SingletonNode.java | 0 .../state/merkle/singleton/StringLeaf.java | 0 .../state/merkle/singleton/ValueLeaf.java | 0 .../singleton/WritableSingletonStateImpl.java | 0 .../src/main/java/module-info.java | 17 +++++++++ .../swirlds/state/impl}/HapiUtilsTest.java | 4 +-- .../swirlds/state/merkle/StateUtilsTest.java | 0 .../merkle/disk/OnDiskKeySerializerTest.java | 0 .../merkle/disk/OnDiskReadableStateTest.java | 0 .../merkle/disk/OnDiskWritableStateTest.java | 0 .../memory/InMemoryReadableStateTest.java | 0 .../memory/InMemoryWritableStateTest.java | 0 .../state/merkle/queue/QueueNodeTest.java | 0 .../merkle/singleton/SingletonNodeTest.java | 0 .../merkle/singleton/StringLeafTest.java | 0 .../state/merkle/singleton/ValueLeafTest.java | 0 .../test/fixtures/merkle/MerkleTestBase.java | 0 .../fixtures/merkle/TestArgumentUtils.java | 0 .../test/fixtures/merkle/TestLongCodec.java | 0 .../test/fixtures/merkle/TestStringCodec.java | 0 .../src/testFixtures/java/module-info.java | 16 +++++++++ 228 files changed, 410 insertions(+), 345 deletions(-) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/HapiUtils.java (99%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/MigrationContext.java (95%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/Schema.java (97%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/SchemaRegistry.java (98%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/Service.java (98%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/StateDefinition.java (98%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/info/NetworkInfo.java (97%) rename platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/{spi => lifecycle}/info/NodeInfo.java (98%) create mode 100644 platform-sdk/swirlds-state-impl/build.gradle.kts rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/StateMetadata.java (98%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/StateUtils.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskIterator.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskKey.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskKeySerializer.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskReadableKVState.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskValue.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskValueSerializer.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/disk/OnDiskWritableKVState.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/logging/StateLogger.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/memory/InMemoryKey.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/memory/InMemoryReadableKVState.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/memory/InMemoryValue.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/memory/InMemoryWritableKVState.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/queue/QueueNode.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/queue/ReadableQueueStateImpl.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/queue/WritableQueueStateImpl.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/singleton/ReadableSingletonStateImpl.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/singleton/SingletonNode.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/singleton/StringLeaf.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/singleton/ValueLeaf.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/main/java/com/swirlds/state/merkle/singleton/WritableSingletonStateImpl.java (100%) create mode 100644 platform-sdk/swirlds-state-impl/src/main/java/module-info.java rename platform-sdk/{swirlds-state-api/src/test/java/com/swirlds/state/spi => swirlds-state-impl/src/test/java/com/swirlds/state/impl}/HapiUtilsTest.java (95%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/StateUtilsTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/disk/OnDiskKeySerializerTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/disk/OnDiskReadableStateTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/disk/OnDiskWritableStateTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/memory/InMemoryReadableStateTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/memory/InMemoryWritableStateTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/queue/QueueNodeTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/singleton/SingletonNodeTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/singleton/StringLeafTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/test/java/com/swirlds/state/merkle/singleton/ValueLeafTest.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/MerkleTestBase.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestArgumentUtils.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestLongCodec.java (100%) rename platform-sdk/{swirlds-state-api => swirlds-state-impl}/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestStringCodec.java (100%) create mode 100644 platform-sdk/swirlds-state-impl/src/testFixtures/java/module-info.java diff --git a/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/AddressBookServiceImpl.java b/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/AddressBookServiceImpl.java index 3580c6c3e666..0c065eba9865 100644 --- a/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/AddressBookServiceImpl.java +++ b/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/AddressBookServiceImpl.java @@ -19,7 +19,7 @@ import com.hedera.node.app.service.addressbook.AddressBookService; import com.hedera.node.app.service.addressbook.impl.schemas.V053AddressBookSchema; import com.hedera.node.app.spi.RpcService; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/schemas/V053AddressBookSchema.java b/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/schemas/V053AddressBookSchema.java index 9f112c753e0f..d4c86ca017eb 100644 --- a/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/schemas/V053AddressBookSchema.java +++ b/hedera-node/hedera-addressbook-service-impl/src/main/java/com/hedera/node/app/service/addressbook/impl/schemas/V053AddressBookSchema.java @@ -36,10 +36,10 @@ import com.hedera.node.config.data.FilesConfig; import com.hedera.pbj.runtime.ParseException; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.ReadableKVState; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Map; diff --git a/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/AddressBookServiceImplTest.java b/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/AddressBookServiceImplTest.java index 9ed5858690c7..761522d2a9fc 100644 --- a/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/AddressBookServiceImplTest.java +++ b/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/AddressBookServiceImplTest.java @@ -22,7 +22,7 @@ import static org.mockito.Mockito.verify; import com.hedera.node.app.service.addressbook.impl.AddressBookServiceImpl; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/schemas/V053AddressBookSchemaTest.java b/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/schemas/V053AddressBookSchemaTest.java index 22f02182ee70..4d3642a9917c 100644 --- a/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/schemas/V053AddressBookSchemaTest.java +++ b/hedera-node/hedera-addressbook-service-impl/src/test/java/com/hedera/node/app/service/addressbook/impl/test/schemas/V053AddressBookSchemaTest.java @@ -43,9 +43,9 @@ import com.hedera.node.app.spi.fixtures.util.LoggingTarget; import com.hedera.node.config.testfixtures.HederaTestConfigBuilder; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.StateDefinition; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.test.fixtures.MapWritableKVState; import java.util.ArrayList; import java.util.HashMap; diff --git a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/AppContext.java b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/AppContext.java index 61ec7b02a9ba..a25c9f62c223 100644 --- a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/AppContext.java +++ b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/AppContext.java @@ -20,11 +20,12 @@ import com.hedera.hapi.node.transaction.TransactionBody; import com.hedera.node.app.spi.signatures.SignatureVerifier; import com.swirlds.common.crypto.Signature; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.InstantSource; /** - * Gives context to {@link com.swirlds.state.spi.Service} implementations on how the application workflows will do + * Gives context to {@link Service} implementations on how the application workflows will do * shared functions like verifying signatures or computing the current instant. */ public interface AppContext { diff --git a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/RpcService.java b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/RpcService.java index 94001cf17a7a..44a6334a3e0b 100644 --- a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/RpcService.java +++ b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/RpcService.java @@ -17,7 +17,7 @@ package com.hedera.node.app.spi; import com.hedera.pbj.runtime.RpcServiceDefinition; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/HandleContext.java b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/HandleContext.java index c761bab4dd7b..83ec8a269399 100644 --- a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/HandleContext.java +++ b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/HandleContext.java @@ -16,7 +16,6 @@ package com.hedera.node.app.spi.workflows; -import static com.hedera.node.app.spi.AppContext.*; import static com.hedera.node.app.spi.workflows.HandleContext.TransactionCategory.SCHEDULED; import com.hedera.hapi.node.base.AccountID; @@ -37,8 +36,8 @@ import com.hedera.node.app.spi.workflows.record.ExternalizedRecordCustomizer; import com.hedera.node.app.spi.workflows.record.StreamBuilder; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.time.Instant; diff --git a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/SystemContext.java b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/SystemContext.java index b4e5c5b87e6c..b56bc9f9431d 100644 --- a/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/SystemContext.java +++ b/hedera-node/hedera-app-spi/src/main/java/com/hedera/node/app/spi/workflows/SystemContext.java @@ -18,7 +18,7 @@ import com.hedera.hapi.node.transaction.TransactionBody; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; diff --git a/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/SchemaTest.java b/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/SchemaTest.java index 2a9fb8de8e66..9181df973b8c 100644 --- a/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/SchemaTest.java +++ b/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/SchemaTest.java @@ -22,7 +22,7 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.node.app.spi.fixtures.state.MapWritableStates; import com.swirlds.platform.test.fixtures.state.TestSchema; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.Schema; import com.swirlds.state.test.fixtures.StateTestBase; import java.util.ArrayList; import java.util.Collections; diff --git a/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/StateDefinitionTest.java b/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/StateDefinitionTest.java index 88396b509c0e..588c7ae2e92d 100644 --- a/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/StateDefinitionTest.java +++ b/hedera-node/hedera-app-spi/src/test/java/com/hedera/node/app/spi/state/StateDefinitionTest.java @@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.*; import com.hedera.pbj.runtime.Codec; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.StateDefinition; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/TestService.java b/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/TestService.java index d9e35f2dee19..5d5b344a8066 100644 --- a/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/TestService.java +++ b/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/TestService.java @@ -20,9 +20,9 @@ import com.hedera.node.app.hapi.utils.ethereum.EthTxData; import com.swirlds.platform.test.fixtures.state.TestSchema; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.ArrayList; import java.util.List; diff --git a/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/info/FakeNetworkInfo.java b/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/info/FakeNetworkInfo.java index abf61a64119d..9838e2cc658c 100644 --- a/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/info/FakeNetworkInfo.java +++ b/hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/info/FakeNetworkInfo.java @@ -24,8 +24,8 @@ import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.common.platform.NodeId; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.List; diff --git a/hedera-node/hedera-app/build.gradle.kts b/hedera-node/hedera-app/build.gradle.kts index bdbb0aa6667a..46cc20235ce4 100644 --- a/hedera-node/hedera-app/build.gradle.kts +++ b/hedera-node/hedera-app/build.gradle.kts @@ -51,6 +51,7 @@ testModuleInfo { requires("com.swirlds.common.test.fixtures") requires("com.swirlds.platform.core.test.fixtures") requires("com.swirlds.state.api.test.fixtures") + requires("com.swirlds.state.impl.test.fixtures") requires("com.swirlds.base.test.fixtures") requires("headlong") requires("org.assertj.core") diff --git a/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/BlockStreamManagerBenchmark.java b/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/BlockStreamManagerBenchmark.java index 3bec28d339f0..075cb53a49c2 100644 --- a/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/BlockStreamManagerBenchmark.java +++ b/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/BlockStreamManagerBenchmark.java @@ -58,7 +58,7 @@ import com.swirlds.platform.system.Round; import com.swirlds.platform.system.events.ConsensusEvent; import com.swirlds.platform.system.state.notifications.StateHashedNotification; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.Schema; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.ByteArrayOutputStream; diff --git a/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/StandaloneRoundManagement.java b/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/StandaloneRoundManagement.java index a1bdebfe0c67..f712157e56a3 100644 --- a/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/StandaloneRoundManagement.java +++ b/hedera-node/hedera-app/src/jmh/java/com/hedera/node/app/blocks/StandaloneRoundManagement.java @@ -59,7 +59,7 @@ import com.swirlds.platform.system.Round; import com.swirlds.platform.system.events.ConsensusEvent; import com.swirlds.platform.system.state.notifications.StateHashedNotification; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.Schema; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.IOException; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/Hedera.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/Hedera.java index 40512b1c57ec..fa1f9c7df0ca 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/Hedera.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/Hedera.java @@ -147,8 +147,8 @@ import com.swirlds.platform.system.transaction.Transaction; import com.swirlds.state.State; import com.swirlds.state.StateChangeListener; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.WritableSingletonStateBase; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.nio.charset.Charset; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/HederaInjectionComponent.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/HederaInjectionComponent.java index bff0023adaea..26c12944924b 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/HederaInjectionComponent.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/HederaInjectionComponent.java @@ -64,8 +64,8 @@ import com.swirlds.platform.system.InitTrigger; import com.swirlds.platform.system.Platform; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import dagger.BindsInstance; import dagger.Component; import java.nio.charset.Charset; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamModule.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamModule.java index 8d4b6812e0f0..f6195ff6f6f8 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamModule.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamModule.java @@ -21,7 +21,7 @@ import com.hedera.node.app.blocks.impl.GrpcBlockItemWriter; import com.hedera.node.config.ConfigProvider; import com.hedera.node.config.data.BlockStreamConfig; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import dagger.Binds; import dagger.Module; import dagger.Provides; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamService.java index 98d3c1c4fcd9..7c84bab34dcc 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/BlockStreamService.java @@ -20,8 +20,8 @@ import com.hedera.node.app.blocks.schemas.V0560BlockStreamSchema; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Optional; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/impl/FileBlockItemWriter.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/impl/FileBlockItemWriter.java index 2ab1f6fb3f98..d36535fef66f 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/impl/FileBlockItemWriter.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/impl/FileBlockItemWriter.java @@ -16,7 +16,7 @@ package com.hedera.node.app.blocks.impl; -import static com.swirlds.state.spi.HapiUtils.asAccountString; +import static com.swirlds.state.lifecycle.HapiUtils.asAccountString; import static java.util.Objects.requireNonNull; import com.hedera.hapi.block.stream.schema.BlockSchema; @@ -27,7 +27,7 @@ import com.hedera.pbj.runtime.ProtoWriterTools; import com.hedera.pbj.runtime.io.buffer.BufferedData; import com.hedera.pbj.runtime.io.stream.WritableStreamingData; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.io.BufferedOutputStream; import java.io.IOException; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchema.java index 9ae8ddf3e242..d789265c4642 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchema.java @@ -26,9 +26,9 @@ import com.hedera.hapi.node.state.blockstream.BlockStreamInfo; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import java.util.function.Consumer; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/FeeService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/FeeService.java index 67c753428fa7..d2edc8ea0a48 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/FeeService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/FeeService.java @@ -17,8 +17,8 @@ package com.hedera.node.app.fees; import com.hedera.node.app.fees.schemas.V0490FeeSchema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; public class FeeService implements Service { diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/schemas/V0490FeeSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/schemas/V0490FeeSchema.java index 4d38e6f072af..efc01409d355 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/schemas/V0490FeeSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/fees/schemas/V0490FeeSchema.java @@ -21,9 +21,9 @@ import com.hedera.hapi.node.transaction.ExchangeRate; import com.hedera.hapi.node.transaction.ExchangeRateSet; import com.hedera.node.config.data.BootstrapConfig; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/EntityIdService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/EntityIdService.java index ff0ff94dffe7..04c3f74ab438 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/EntityIdService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/EntityIdService.java @@ -17,8 +17,8 @@ package com.hedera.node.app.ids; import com.hedera.node.app.ids.schemas.V0490EntityIdSchema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/schemas/V0490EntityIdSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/schemas/V0490EntityIdSchema.java index c1f987296ebc..e63a8fd4196c 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/schemas/V0490EntityIdSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/schemas/V0490EntityIdSchema.java @@ -19,10 +19,10 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.node.state.common.EntityNumber; import com.hedera.node.config.data.HederaConfig; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.ReadableStates; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.apache.logging.log4j.LogManager; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/GenesisNetworkInfo.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/GenesisNetworkInfo.java index 8b5ec7d54b4d..e07c0da07246 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/GenesisNetworkInfo.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/GenesisNetworkInfo.java @@ -23,8 +23,8 @@ import com.hedera.hapi.node.state.roster.RosterEntry; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.LinkedHashMap; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/InfoInjectionModule.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/InfoInjectionModule.java index 4f03f047afdf..9b1d618a0678 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/InfoInjectionModule.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/InfoInjectionModule.java @@ -18,7 +18,7 @@ import com.hedera.hapi.node.base.AccountID; import com.hedera.node.app.annotations.NodeSelfId; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import dagger.Module; import dagger.Provides; import edu.umd.cs.findbugs.annotations.NonNull; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/NodeInfoImpl.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/NodeInfoImpl.java index 851c13b3ad1c..7332bfec6988 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/NodeInfoImpl.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/NodeInfoImpl.java @@ -21,7 +21,7 @@ import com.hedera.hapi.node.state.addressbook.Node; import com.hedera.hapi.node.state.roster.RosterEntry; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.List; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/StateNetworkInfo.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/StateNetworkInfo.java index e60d06a7c904..ca1f486fb674 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/StateNetworkInfo.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/StateNetworkInfo.java @@ -33,9 +33,9 @@ import com.swirlds.platform.state.service.PlatformStateService; import com.swirlds.platform.state.service.ReadablePlatformStateStore; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.ReadableKVState; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.LinkedHashMap; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/UnavailableNetworkInfo.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/UnavailableNetworkInfo.java index 5ac01725c1e1..87fb87732f66 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/UnavailableNetworkInfo.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/info/UnavailableNetworkInfo.java @@ -19,8 +19,8 @@ import com.hedera.hapi.node.state.roster.Roster; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.List; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/BlockRecordService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/BlockRecordService.java index ed0b7f43c613..0665336415ca 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/BlockRecordService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/BlockRecordService.java @@ -20,8 +20,8 @@ import com.hedera.node.app.records.impl.BlockRecordManagerImpl; import com.hedera.node.app.records.schemas.V0490BlockRecordSchema; import com.hedera.node.app.records.schemas.V0560BlockRecordSchema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import javax.inject.Singleton; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/BlockRecordWriterFactoryImpl.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/BlockRecordWriterFactoryImpl.java index dc250fb47b2c..ece443a5b633 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/BlockRecordWriterFactoryImpl.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/BlockRecordWriterFactoryImpl.java @@ -24,7 +24,7 @@ import com.hedera.node.config.ConfigProvider; import com.hedera.node.config.data.BlockRecordStreamConfig; import com.swirlds.common.stream.Signer; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.nio.file.FileSystem; import javax.inject.Inject; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/v6/BlockRecordWriterV6.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/v6/BlockRecordWriterV6.java index 656ed79dd980..da7bdd049764 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/v6/BlockRecordWriterV6.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/impl/producers/formats/v6/BlockRecordWriterV6.java @@ -29,7 +29,7 @@ import static com.hedera.pbj.runtime.ProtoWriterTools.writeLong; import static com.hedera.pbj.runtime.ProtoWriterTools.writeMessage; import static com.swirlds.common.stream.LinkedObjectStreamUtilities.convertInstantToStringWithPadding; -import static com.swirlds.state.spi.HapiUtils.asAccountString; +import static com.swirlds.state.lifecycle.HapiUtils.asAccountString; import static java.util.Objects.requireNonNull; import com.hedera.hapi.node.base.SemanticVersion; @@ -46,7 +46,7 @@ import com.swirlds.common.crypto.DigestType; import com.swirlds.common.crypto.HashingOutputStream; import com.swirlds.common.stream.Signer; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.io.BufferedOutputStream; import java.io.IOException; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0490BlockRecordSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0490BlockRecordSchema.java index 8c583fd388a2..78b1c7df4043 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0490BlockRecordSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0490BlockRecordSchema.java @@ -22,9 +22,9 @@ import com.hedera.hapi.node.state.blockrecords.BlockInfo; import com.hedera.hapi.node.state.blockrecords.RunningHashes; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.apache.logging.log4j.LogManager; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0560BlockRecordSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0560BlockRecordSchema.java index 6cb83032ebd7..47e864afbbdd 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0560BlockRecordSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/records/schemas/V0560BlockRecordSchema.java @@ -20,8 +20,8 @@ import static com.hedera.node.app.records.schemas.V0490BlockRecordSchema.RUNNING_HASHES_STATE_KEY; import com.hedera.hapi.node.base.SemanticVersion; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; import edu.umd.cs.findbugs.annotations.NonNull; public class V0560BlockRecordSchema extends Schema { diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/roster/RosterService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/roster/RosterService.java index b933934815b7..2434abff0a1a 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/roster/RosterService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/roster/RosterService.java @@ -20,8 +20,8 @@ import com.swirlds.common.RosterStateId; import com.swirlds.platform.state.service.schemas.V0540RosterSchema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/MigrationContextImpl.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/MigrationContextImpl.java index 47b2ed7d27fa..496289d1d6bc 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/MigrationContextImpl.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/MigrationContextImpl.java @@ -23,10 +23,10 @@ import com.hedera.node.app.spi.state.FilteredWritableStates; import com.swirlds.config.api.Configuration; import com.swirlds.platform.state.MerkleStateRoot; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.ReadableStates; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Map; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/OrderedServiceMigrator.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/OrderedServiceMigrator.java index 41e660116c01..5fa965e9a327 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/OrderedServiceMigrator.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/OrderedServiceMigrator.java @@ -29,9 +29,9 @@ import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.system.SoftwareVersion; import com.swirlds.state.State; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.HashMap; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServiceMigrator.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServiceMigrator.java index b8691b489664..f35571b6788d 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServiceMigrator.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServiceMigrator.java @@ -22,7 +22,7 @@ import com.swirlds.metrics.api.Metrics; import com.swirlds.platform.system.SoftwareVersion; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.List; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistry.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistry.java index 0554710fcb04..30670b049ebd 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistry.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistry.java @@ -20,8 +20,8 @@ import com.swirlds.common.constructable.ConstructableRegistry; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Comparator; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistryImpl.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistryImpl.java index 417c12f1d4dd..c2827a02d8c8 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistryImpl.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/services/ServicesRegistryImpl.java @@ -22,7 +22,7 @@ import com.hedera.node.app.state.merkle.SchemaApplications; import com.swirlds.common.constructable.ConstructableRegistry; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Collections; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/logging/TransactionStateLogger.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/logging/TransactionStateLogger.java index 501fc30f3af0..dadadd25ef77 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/logging/TransactionStateLogger.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/logging/TransactionStateLogger.java @@ -27,7 +27,7 @@ import com.hedera.node.app.workflows.prehandle.PreHandleResult; import com.swirlds.platform.system.Round; import com.swirlds.platform.system.events.ConsensusEvent; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistry.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistry.java index ea04a326128f..ee076fef4e80 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistry.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistry.java @@ -42,6 +42,12 @@ import com.swirlds.metrics.api.Metrics; import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.merkle.StateMetadata; import com.swirlds.state.merkle.StateUtils; import com.swirlds.state.merkle.disk.OnDiskKey; @@ -54,13 +60,7 @@ import com.swirlds.state.merkle.singleton.SingletonNode; import com.swirlds.state.merkle.singleton.StringLeaf; import com.swirlds.state.merkle.singleton.ValueLeaf; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; import com.swirlds.virtualmap.VirtualMap; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplicationType.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplicationType.java index 80c03f9a3583..4ed212b14f5a 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplicationType.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplicationType.java @@ -17,7 +17,7 @@ package com.hedera.node.app.state.merkle; import com.swirlds.platform.state.MerkleStateRoot; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.Schema; /** * Enumerates the ways the {@link MerkleSchemaRegistry} may apply a {@link Schema} diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplications.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplications.java index a69309fd1a56..32496edafdff 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplications.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/SchemaApplications.java @@ -26,7 +26,7 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.swirlds.config.api.Configuration; import com.swirlds.platform.state.MerkleStateRoot; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.Schema; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.EnumSet; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/VersionUtils.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/VersionUtils.java index 7034e6a463c8..33f67a9a9399 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/VersionUtils.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/merkle/VersionUtils.java @@ -16,7 +16,7 @@ package com.hedera.node.app.state.merkle; -import static com.swirlds.state.spi.HapiUtils.SEMANTIC_VERSION_COMPARATOR; +import static com.swirlds.state.lifecycle.HapiUtils.SEMANTIC_VERSION_COMPARATOR; import static java.util.Objects.requireNonNull; import com.hedera.hapi.node.base.SemanticVersion; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheImpl.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheImpl.java index 3411ced6a616..b8fb4dbd1298 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheImpl.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheImpl.java @@ -43,10 +43,10 @@ import com.hedera.node.config.data.HederaConfig; import com.hedera.node.config.data.LedgerConfig; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.CommittableWritableStates; import com.swirlds.state.spi.ReadableQueueState; import com.swirlds.state.spi.WritableQueueState; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheService.java index 2273707de1cb..ed019ac6e60d 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/RecordCacheService.java @@ -18,8 +18,8 @@ import com.hedera.node.app.state.recordcache.schemas.V0490RecordCacheSchema; import com.hedera.node.app.state.recordcache.schemas.V0540RecordCacheSchema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0490RecordCacheSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0490RecordCacheSchema.java index 82f7f81e5c07..68eb2c45e642 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0490RecordCacheSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0490RecordCacheSchema.java @@ -18,9 +18,9 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.node.state.recordcache.TransactionRecordEntry; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchema.java index 492fb6ebe309..9e22e38287d7 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchema.java @@ -23,10 +23,10 @@ import com.hedera.hapi.node.state.recordcache.TransactionReceiptEntry; import com.hedera.hapi.node.state.recordcache.TransactionRecordEntry; import com.hedera.hapi.node.transaction.TransactionReceipt; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.ReadableQueueState; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableQueueState; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.ArrayList; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/CongestionThrottleService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/CongestionThrottleService.java index 7a2d110d1207..e2e72b07a021 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/CongestionThrottleService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/CongestionThrottleService.java @@ -17,8 +17,8 @@ package com.hedera.node.app.throttle; import com.hedera.node.app.throttle.schemas.V0490CongestionThrottleSchema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import javax.inject.Singleton; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/schemas/V0490CongestionThrottleSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/schemas/V0490CongestionThrottleSchema.java index 8502aaec1636..a7fc82d3f08e 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/schemas/V0490CongestionThrottleSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/throttle/schemas/V0490CongestionThrottleSchema.java @@ -19,9 +19,9 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.node.state.congestion.CongestionLevelStarts; import com.hedera.hapi.node.state.throttles.ThrottleUsageSnapshots; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.apache.logging.log4j.LogManager; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseService.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseService.java index 5ebcb2627dee..74466b99d239 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseService.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseService.java @@ -26,7 +26,7 @@ import com.swirlds.config.api.Configuration; import com.swirlds.platform.system.InitTrigger; import com.swirlds.state.State; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.function.BiConsumer; import java.util.function.Consumer; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseServiceImpl.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseServiceImpl.java index a026d4b6aed2..083c5543767b 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseServiceImpl.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/TssBaseServiceImpl.java @@ -57,8 +57,8 @@ import com.swirlds.platform.state.service.ReadableRosterStore; import com.swirlds.platform.system.InitTrigger; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.SchemaRegistry; import com.swirlds.state.spi.ReadableKVState; -import com.swirlds.state.spi.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.time.InstantSource; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/schemas/V0560TssBaseSchema.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/schemas/V0560TssBaseSchema.java index 204ff65bcd2d..04adfadf2cd2 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/schemas/V0560TssBaseSchema.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/tss/schemas/V0560TssBaseSchema.java @@ -21,8 +21,8 @@ import com.hedera.hapi.node.state.tss.TssVoteMapKey; import com.hedera.hapi.services.auxiliary.tss.TssMessageTransactionBody; import com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/HederaSoftwareVersion.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/HederaSoftwareVersion.java index c8f44252f68c..dafd0bf5bf0b 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/HederaSoftwareVersion.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/HederaSoftwareVersion.java @@ -16,9 +16,9 @@ package com.hedera.node.app.version; -import static com.swirlds.state.spi.HapiUtils.SEMANTIC_VERSION_COMPARATOR; -import static com.swirlds.state.spi.HapiUtils.deserializeSemVer; -import static com.swirlds.state.spi.HapiUtils.serializeSemVer; +import static com.swirlds.state.lifecycle.HapiUtils.SEMANTIC_VERSION_COMPARATOR; +import static com.swirlds.state.lifecycle.HapiUtils.deserializeSemVer; +import static com.swirlds.state.lifecycle.HapiUtils.serializeSemVer; import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.util.HapiUtils; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/ServicesSoftwareVersion.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/ServicesSoftwareVersion.java index 0b88f18b0a13..4b94a6888523 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/ServicesSoftwareVersion.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/version/ServicesSoftwareVersion.java @@ -16,9 +16,9 @@ package com.hedera.node.app.version; -import static com.swirlds.state.spi.HapiUtils.SEMANTIC_VERSION_COMPARATOR; -import static com.swirlds.state.spi.HapiUtils.deserializeSemVer; -import static com.swirlds.state.spi.HapiUtils.serializeSemVer; +import static com.swirlds.state.lifecycle.HapiUtils.SEMANTIC_VERSION_COMPARATOR; +import static com.swirlds.state.lifecycle.HapiUtils.deserializeSemVer; +import static com.swirlds.state.lifecycle.HapiUtils.serializeSemVer; import static java.util.Objects.requireNonNull; import com.hedera.hapi.node.base.SemanticVersion; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/Dispatch.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/Dispatch.java index fead26cd0523..050ca5b8b01f 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/Dispatch.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/Dispatch.java @@ -32,8 +32,8 @@ import com.hedera.node.app.workflows.prehandle.PreHandleResult; import com.hedera.node.app.workflows.prehandle.PreHandleWorkflow; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.Service; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.Service; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.time.Instant; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchHandleContext.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchHandleContext.java index 92e9d42e40f1..859e254f67e3 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchHandleContext.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchHandleContext.java @@ -69,8 +69,8 @@ import com.hedera.node.app.workflows.handle.validation.ExpiryValidatorImpl; import com.hedera.node.app.workflows.prehandle.PreHandleContextImpl; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchProcessor.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchProcessor.java index 82d561875567..8fc05ea54a23 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchProcessor.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/DispatchProcessor.java @@ -51,7 +51,7 @@ import com.hedera.node.app.workflows.handle.throttle.DispatchUsageManager; import com.hedera.node.app.workflows.handle.throttle.ThrottleException; import com.hedera.node.config.data.NetworkAdminConfig; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import javax.inject.Inject; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/HandleWorkflow.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/HandleWorkflow.java index d484b64923b9..cce734b93e57 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/HandleWorkflow.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/HandleWorkflow.java @@ -36,7 +36,7 @@ import static com.hedera.node.config.types.StreamMode.BLOCKS; import static com.hedera.node.config.types.StreamMode.RECORDS; import static com.swirlds.platform.system.InitTrigger.EVENT_STREAM_RECOVERY; -import static com.swirlds.state.spi.HapiUtils.SEMANTIC_VERSION_COMPARATOR; +import static com.swirlds.state.lifecycle.HapiUtils.SEMANTIC_VERSION_COMPARATOR; import static java.util.Objects.requireNonNull; import com.hedera.hapi.block.stream.BlockItem; @@ -91,8 +91,8 @@ import com.swirlds.platform.system.events.ConsensusEvent; import com.swirlds.platform.system.transaction.ConsensusTransaction; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.util.ArrayList; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/RecordDispatch.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/RecordDispatch.java index 8a8cf52c3235..4f747b8aa4e9 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/RecordDispatch.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/RecordDispatch.java @@ -30,7 +30,7 @@ import com.hedera.node.app.workflows.handle.stack.SavepointStackImpl; import com.hedera.node.app.workflows.prehandle.PreHandleResult; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactory.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactory.java index e365cf56100f..9e93cdf9499c 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactory.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactory.java @@ -79,8 +79,8 @@ import com.hedera.node.config.data.HederaConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/record/SystemSetup.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/record/SystemSetup.java index 583d33448923..e915f5bbd895 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/record/SystemSetup.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/record/SystemSetup.java @@ -60,7 +60,7 @@ import com.swirlds.platform.system.InitTrigger; import com.swirlds.platform.system.Platform; import com.swirlds.platform.system.SoftwareVersion; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.IOException; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxn.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxn.java index 6f1c2b1612d4..5822a9f61180 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxn.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxn.java @@ -27,7 +27,7 @@ import com.swirlds.config.api.Configuration; import com.swirlds.platform.system.events.ConsensusEvent; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxnFactory.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxnFactory.java index 045ef2899260..b349358758e7 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxnFactory.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/steps/UserTxnFactory.java @@ -79,8 +79,8 @@ import com.swirlds.platform.system.events.ConsensusEvent; import com.swirlds.platform.system.transaction.ConsensusTransaction; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.util.Collections; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManager.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManager.java index 807c3022a35d..5f5262686b8a 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManager.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManager.java @@ -42,7 +42,7 @@ import com.hedera.node.app.workflows.OpWorkflowMetrics; import com.hedera.node.app.workflows.handle.Dispatch; import com.hedera.node.config.data.ContractsConfig; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.EnumSet; import java.util.Set; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/prehandle/PreHandleWorkflow.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/prehandle/PreHandleWorkflow.java index b93e37ac9966..a416328dd97e 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/prehandle/PreHandleWorkflow.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/prehandle/PreHandleWorkflow.java @@ -22,7 +22,7 @@ import com.swirlds.platform.system.events.Event; import com.swirlds.platform.system.transaction.ConsensusTransaction; import com.swirlds.platform.system.transaction.Transaction; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.stream.Stream; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneDispatchFactory.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneDispatchFactory.java index acb07d7e0f1a..2edeb53e8815 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneDispatchFactory.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneDispatchFactory.java @@ -71,8 +71,8 @@ import com.swirlds.platform.system.transaction.ConsensusTransaction; import com.swirlds.platform.system.transaction.TransactionWrapper; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.util.List; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneModule.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneModule.java index d58b54cb14e9..c32777343710 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneModule.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneModule.java @@ -26,7 +26,7 @@ import com.swirlds.common.crypto.CryptographyHolder; import com.swirlds.platform.state.PlatformState; import com.swirlds.platform.state.PlatformStateAccessor; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import dagger.Binds; import dagger.Module; import dagger.Provides; diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneNetworkInfo.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneNetworkInfo.java index e2eef98aabe6..8885d13e591f 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneNetworkInfo.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/standalone/impl/StandaloneNetworkInfo.java @@ -31,8 +31,8 @@ import com.hedera.pbj.runtime.ParseException; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.List; diff --git a/hedera-node/hedera-app/src/main/java/module-info.java b/hedera-node/hedera-app/src/main/java/module-info.java index c85d81492ffe..9d70c2795de5 100644 --- a/hedera-node/hedera-app/src/main/java/module-info.java +++ b/hedera-node/hedera-app/src/main/java/module-info.java @@ -39,6 +39,7 @@ requires com.swirlds.logging; requires com.swirlds.merkle; requires com.swirlds.merkledb; + requires com.swirlds.state.impl; requires com.swirlds.virtualmap; requires com.google.common; requires com.google.protobuf; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/BlockStreamServiceTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/BlockStreamServiceTest.java index 0b814a9a506b..f3a81f905de5 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/BlockStreamServiceTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/BlockStreamServiceTest.java @@ -21,7 +21,7 @@ import static org.mockito.Mockito.verify; import com.hedera.node.app.blocks.schemas.V0560BlockStreamSchema; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/impl/FileBlockItemWriterTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/impl/FileBlockItemWriterTest.java index 873ffd7d2452..80ed1b7a2220 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/impl/FileBlockItemWriterTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/impl/FileBlockItemWriterTest.java @@ -28,7 +28,7 @@ import com.hedera.node.config.VersionedConfiguration; import com.hedera.node.config.data.BlockStreamConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.Files; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchemaTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchemaTest.java index 6446e8c96cbb..3fdf4f451c49 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchemaTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/blocks/schemas/V0560BlockStreamSchemaTest.java @@ -30,7 +30,7 @@ import com.hedera.hapi.node.state.blockrecords.RunningHashes; import com.hedera.hapi.node.state.blockstream.BlockStreamInfo; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; import com.swirlds.state.spi.WritableSingletonState; import com.swirlds.state.spi.WritableStates; import java.util.List; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/components/IngestComponentTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/components/IngestComponentTest.java index 5f05fe33fe9c..503476896daa 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/components/IngestComponentTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/components/IngestComponentTest.java @@ -60,7 +60,7 @@ import com.swirlds.platform.system.InitTrigger; import com.swirlds.platform.system.Platform; import com.swirlds.platform.system.status.PlatformStatus; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import java.time.InstantSource; import java.util.ArrayDeque; import java.util.List; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/RosterServiceTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/RosterServiceTest.java index 749ec29e1e8a..b0fa970e9e60 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/RosterServiceTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/RosterServiceTest.java @@ -23,8 +23,8 @@ import com.swirlds.common.RosterStateId; import com.swirlds.platform.state.service.schemas.V0540RosterSchema; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/schemas/V0540RosterSchemaTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/schemas/V0540RosterSchemaTest.java index d2e230cb9b63..042f9c36d51c 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/schemas/V0540RosterSchemaTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/roster/schemas/V0540RosterSchemaTest.java @@ -29,8 +29,8 @@ import com.hedera.hapi.node.state.roster.RosterState; import com.hedera.node.app.spi.fixtures.util.LoggingSubject; import com.swirlds.platform.state.service.schemas.V0540RosterSchema; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.WritableSingletonState; import com.swirlds.state.spi.WritableStates; import org.junit.jupiter.api.BeforeEach; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/services/ServiceRegistryImplTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/services/ServiceRegistryImplTest.java index 83a8683fe4f3..11a015f29326 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/services/ServiceRegistryImplTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/services/ServiceRegistryImplTest.java @@ -28,7 +28,7 @@ import com.swirlds.common.constructable.ConstructableRegistry; import com.swirlds.common.constructable.ConstructableRegistryException; import com.swirlds.platform.test.fixtures.state.TestSchema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.StateDefinition; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/DependencyMigrationTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/DependencyMigrationTest.java index 73ec70f97697..4c172ccb25b5 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/DependencyMigrationTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/DependencyMigrationTest.java @@ -36,13 +36,13 @@ import com.swirlds.platform.state.MerkleStateLifecycles; import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.test.fixtures.state.MerkleTestBase; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.LinkedList; import java.util.List; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistryTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistryTest.java index e4f19b5a3e32..ff06426e48e9 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistryTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/MerkleSchemaRegistryTest.java @@ -36,14 +36,14 @@ import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.test.fixtures.state.MerkleTestBase; import com.swirlds.platform.test.fixtures.state.TestSchema; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.ReadableKVState; import com.swirlds.state.spi.ReadableSingletonState; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableKVState; import com.swirlds.state.spi.WritableSingletonState; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.HashMap; import java.util.LinkedList; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SchemaApplicationsTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SchemaApplicationsTest.java index a32afa68a803..e751ca31757c 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SchemaApplicationsTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SchemaApplicationsTest.java @@ -25,8 +25,8 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.node.state.common.EntityNumber; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import java.util.Set; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SerializationTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SerializationTest.java index a501e4afe5aa..610c820b7ae1 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SerializationTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/SerializationTest.java @@ -50,18 +50,18 @@ import com.swirlds.platform.test.fixtures.state.MerkleTestBase; import com.swirlds.platform.test.fixtures.state.RandomSignedStateGenerator; import com.swirlds.platform.test.fixtures.state.TestSchema; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.merkle.disk.OnDiskReadableKVState; import com.swirlds.state.merkle.disk.OnDiskWritableKVState; -import com.swirlds.state.spi.MigrationContext; import com.swirlds.state.spi.ReadableKVState; import com.swirlds.state.spi.ReadableQueueState; import com.swirlds.state.spi.ReadableSingletonState; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableKVState; import com.swirlds.state.spi.WritableQueueState; import com.swirlds.state.spi.WritableSingletonState; -import com.swirlds.state.spi.info.NetworkInfo; import com.swirlds.virtualmap.VirtualMap; import com.swirlds.virtualmap.config.VirtualMapConfig; import com.swirlds.virtualmap.config.VirtualMapConfig_; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/StateMetadataTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/StateMetadataTest.java index 0789e48d06d0..b8ce5d90d9d4 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/StateMetadataTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/StateMetadataTest.java @@ -21,10 +21,10 @@ import com.swirlds.platform.test.fixtures.state.MerkleTestBase; import com.swirlds.platform.test.fixtures.state.TestSchema; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.merkle.StateMetadata; import com.swirlds.state.merkle.StateUtils; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/disk/OnDiskTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/disk/OnDiskTest.java index 18cf66efa8bb..5fe6a8317941 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/disk/OnDiskTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/merkle/disk/OnDiskTest.java @@ -32,6 +32,8 @@ import com.swirlds.merkledb.MerkleDbDataSourceBuilder; import com.swirlds.merkledb.MerkleDbTableConfig; import com.swirlds.platform.test.fixtures.state.MerkleTestBase; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.merkle.StateUtils; import com.swirlds.state.merkle.disk.OnDiskKey; import com.swirlds.state.merkle.disk.OnDiskKeySerializer; @@ -39,8 +41,6 @@ import com.swirlds.state.merkle.disk.OnDiskValue; import com.swirlds.state.merkle.disk.OnDiskValueSerializer; import com.swirlds.state.merkle.disk.OnDiskWritableKVState; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.virtualmap.VirtualMap; import com.swirlds.virtualmap.internal.merkle.VirtualRootNode; import com.swirlds.virtualmap.serialize.KeySerializer; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheImplTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheImplTest.java index a237dce6a8e4..9023aeb454d3 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheImplTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheImplTest.java @@ -52,9 +52,9 @@ import com.hedera.node.config.VersionedConfiguration; import com.hedera.node.config.data.HederaConfig; import com.hedera.node.config.data.LedgerConfig; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.WritableQueueState; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import com.swirlds.state.test.fixtures.ListWritableQueueState; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheServiceTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheServiceTest.java index 9beac23e39b4..5f1f0d800bbf 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheServiceTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/RecordCacheServiceTest.java @@ -22,8 +22,8 @@ import com.hedera.node.app.state.recordcache.schemas.V0490RecordCacheSchema; import com.hedera.node.app.state.recordcache.schemas.V0540RecordCacheSchema; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchemaTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchemaTest.java index 528a1f21a303..b9069780863c 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchemaTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/state/recordcache/schemas/V0540RecordCacheSchemaTest.java @@ -34,10 +34,10 @@ import com.hedera.hapi.node.state.recordcache.TransactionRecordEntry; import com.hedera.hapi.node.transaction.TransactionReceipt; import com.hedera.hapi.node.transaction.TransactionRecord; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.ReadableQueueState; import com.swirlds.state.spi.ReadableStates; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableQueueState; import com.swirlds.state.spi.WritableStates; import java.time.Instant; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/test/grpc/GrpcTestBase.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/test/grpc/GrpcTestBase.java index 000f1e54ab46..88fcc00be632 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/test/grpc/GrpcTestBase.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/test/grpc/GrpcTestBase.java @@ -41,7 +41,7 @@ import com.swirlds.config.api.ConfigurationBuilder; import com.swirlds.config.api.source.ConfigSource; import com.swirlds.metrics.api.Metrics; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import com.swirlds.state.test.fixtures.TestBase; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceImplTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceImplTest.java index 00841cba5305..b7adc7735e88 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceImplTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceImplTest.java @@ -24,7 +24,7 @@ import com.hedera.node.app.spi.AppContext; import com.hedera.node.app.tss.schemas.V0560TssBaseSchema; import com.swirlds.metrics.api.Metrics; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import java.time.InstantSource; import java.util.ArrayList; import java.util.List; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceTest.java index 8ca9f13b0628..cc8403abeed9 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssBaseServiceTest.java @@ -42,7 +42,7 @@ import com.swirlds.metrics.api.Metrics; import com.swirlds.platform.state.service.ReadableRosterStore; import com.swirlds.platform.state.service.WritableRosterStore; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import java.time.InstantSource; import java.util.List; import java.util.concurrent.Executor; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssCryptographyManagerTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssCryptographyManagerTest.java index ea363aba920d..9cbab3213e3a 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssCryptographyManagerTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/TssCryptographyManagerTest.java @@ -43,7 +43,7 @@ import com.hedera.node.app.tss.stores.WritableTssStore; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.common.crypto.Signature; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import java.math.BigInteger; import java.time.InstantSource; import java.util.List; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssMessageHandlerTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssMessageHandlerTest.java index b8ae8af8686f..8b61bc5632f3 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssMessageHandlerTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssMessageHandlerTest.java @@ -46,8 +46,8 @@ import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.common.crypto.Signature; import com.swirlds.platform.state.service.ReadableRosterStore; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.math.BigInteger; import java.time.Instant; import java.util.BitSet; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssSubmissionsTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssSubmissionsTest.java index afa8dbbb7f31..acb2c176481b 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssSubmissionsTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssSubmissionsTest.java @@ -38,8 +38,8 @@ import com.hedera.node.config.data.HederaConfig; import com.hedera.node.config.testfixtures.HederaTestConfigBuilder; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.time.Instant; import java.util.concurrent.ExecutionException; import java.util.concurrent.ForkJoinPool; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssVoteHandlerTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssVoteHandlerTest.java index 8e5856669fd5..74d06fbf182b 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssVoteHandlerTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/handlers/TssVoteHandlerTest.java @@ -38,7 +38,7 @@ import com.hedera.node.app.tss.stores.WritableTssStore; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.platform.state.service.ReadableRosterStore; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/schemas/V0560TSSSchemaTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/schemas/V0560TSSSchemaTest.java index 72e9a7811887..dcebd3056ddc 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/schemas/V0560TSSSchemaTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/tss/schemas/V0560TSSSchemaTest.java @@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.StateDefinition; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchHandleContextTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchHandleContextTest.java index 7a27736dbd25..7a2203449fbc 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchHandleContextTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchHandleContextTest.java @@ -114,10 +114,10 @@ import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.WritableSingletonState; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import com.swirlds.state.test.fixtures.MapReadableKVState; import com.swirlds.state.test.fixtures.MapReadableStates; import com.swirlds.state.test.fixtures.MapWritableKVState; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchProcessorTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchProcessorTest.java index 7b5426829119..8085c762968f 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchProcessorTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/DispatchProcessorTest.java @@ -81,7 +81,7 @@ import com.hedera.node.app.workflows.handle.throttle.DispatchUsageManager; import com.hedera.node.app.workflows.handle.throttle.ThrottleException; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.junit.jupiter.api.BeforeEach; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/HandleWorkflowTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/HandleWorkflowTest.java index f6afeb6e917c..82ed0f2237a4 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/HandleWorkflowTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/HandleWorkflowTest.java @@ -53,8 +53,8 @@ import com.swirlds.platform.system.Round; import com.swirlds.platform.system.events.ConsensusEvent; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.util.List; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactoryTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactoryTest.java index 3c1ec51ebdb2..a928c618011a 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactoryTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ChildDispatchFactoryTest.java @@ -62,8 +62,8 @@ import com.hedera.node.config.testfixtures.HederaTestConfigBuilder; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.time.Instant; import java.util.function.Predicate; import org.junit.jupiter.api.BeforeEach; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ValidationReporterTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ValidationReporterTest.java index 46f9b3b7016d..9328b0902647 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ValidationReporterTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/dispatch/ValidationReporterTest.java @@ -69,7 +69,7 @@ import com.hedera.node.app.workflows.prehandle.PreHandleResult; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.common.platform.NodeId; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.Instant; import java.util.Collections; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordManagerTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordManagerTest.java index 93fada44deff..d428f98429a1 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordManagerTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordManagerTest.java @@ -28,7 +28,7 @@ import static com.hedera.node.app.records.schemas.V0490BlockRecordSchema.BLOCK_INFO_STATE_KEY; import static com.hedera.node.app.records.schemas.V0490BlockRecordSchema.RUNNING_HASHES_STATE_KEY; import static com.swirlds.platform.state.service.PlatformStateService.PLATFORM_STATE_SERVICE; -import static com.swirlds.state.spi.HapiUtils.asAccountString; +import static com.swirlds.state.lifecycle.HapiUtils.asAccountString; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordServiceTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordServiceTest.java index 2c1fd7df386a..78a643fd829b 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordServiceTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/BlockRecordServiceTest.java @@ -32,10 +32,10 @@ import com.hedera.node.app.records.schemas.V0490BlockRecordSchema; import com.hedera.node.app.records.schemas.V0560BlockRecordSchema; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.WritableSingletonState; import com.swirlds.state.spi.WritableStates; import java.util.Set; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/impl/producers/formats/v6/BlockRecordWriterV6Test.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/impl/producers/formats/v6/BlockRecordWriterV6Test.java index 11af013d79b0..e2fd00f22a27 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/impl/producers/formats/v6/BlockRecordWriterV6Test.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/record/impl/producers/formats/v6/BlockRecordWriterV6Test.java @@ -22,7 +22,7 @@ import static com.hedera.node.app.records.RecordTestData.STARTING_RUNNING_HASH_OBJ; import static com.hedera.node.app.records.RecordTestData.TEST_BLOCKS; import static com.hedera.node.app.records.RecordTestData.VERSION; -import static com.swirlds.state.spi.HapiUtils.asAccountString; +import static com.swirlds.state.lifecycle.HapiUtils.asAccountString; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/steps/UserTxnTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/steps/UserTxnTest.java index 8d1bf368c39b..2e3d24173f57 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/steps/UserTxnTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/steps/UserTxnTest.java @@ -68,10 +68,10 @@ import com.swirlds.platform.system.transaction.ConsensusTransaction; import com.swirlds.platform.system.transaction.TransactionWrapper; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.WritableKVState; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import java.time.Instant; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManagerTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManagerTest.java index a961d88d28cb..8ae80416e730 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManagerTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/handle/throttle/DispatchUsageManagerTest.java @@ -61,9 +61,9 @@ import com.hedera.node.config.testfixtures.HederaTestConfigBuilder; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.ReadableStates; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import java.time.Instant; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; diff --git a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/standalone/TransactionExecutorsTest.java b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/standalone/TransactionExecutorsTest.java index e3429081f380..2d006c5af843 100644 --- a/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/standalone/TransactionExecutorsTest.java +++ b/hedera-node/hedera-app/src/test/java/com/hedera/node/app/workflows/standalone/TransactionExecutorsTest.java @@ -77,10 +77,10 @@ import com.swirlds.platform.system.address.AddressBook; import com.swirlds.platform.test.fixtures.addressbook.RandomAddressBookBuilder; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.CommittableWritableStates; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.IOException; diff --git a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/AppTestBase.java b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/AppTestBase.java index 4c0f66ccaf77..8177f3424690 100644 --- a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/AppTestBase.java +++ b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/AppTestBase.java @@ -54,11 +54,11 @@ import com.swirlds.platform.system.address.Address; import com.swirlds.platform.system.address.AddressBook; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.Service; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.ReadableStates; -import com.swirlds.state.spi.Service; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import com.swirlds.state.test.fixtures.MapWritableKVState; import com.swirlds.state.test.fixtures.TestBase; import edu.umd.cs.findbugs.annotations.NonNull; diff --git a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeSchemaRegistry.java b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeSchemaRegistry.java index b4712d57f604..9d5844a1465c 100644 --- a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeSchemaRegistry.java +++ b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeSchemaRegistry.java @@ -30,12 +30,12 @@ import com.hedera.node.app.spi.state.FilteredWritableStates; import com.hedera.node.app.state.merkle.SchemaApplications; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.ReadableStates; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.HashMap; diff --git a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServiceMigrator.java b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServiceMigrator.java index 3c7b30757d95..6a952002fb02 100644 --- a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServiceMigrator.java +++ b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServiceMigrator.java @@ -29,7 +29,7 @@ import com.swirlds.metrics.api.Metrics; import com.swirlds.platform.system.SoftwareVersion; import com.swirlds.state.State; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.HashMap; diff --git a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServicesRegistry.java b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServicesRegistry.java index fad405c7daf1..d648b3d1fadf 100644 --- a/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServicesRegistry.java +++ b/hedera-node/hedera-app/src/testFixtures/java/com/hedera/node/app/fixtures/state/FakeServicesRegistry.java @@ -21,7 +21,7 @@ import com.hedera.node.app.services.ServicesRegistry; import com.swirlds.common.constructable.ConstructableRegistry; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.Service; +import com.swirlds.state.lifecycle.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Collections; import java.util.Set; diff --git a/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/ConsensusServiceImpl.java b/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/ConsensusServiceImpl.java index 77f0441edffe..410cdc5d3e22 100644 --- a/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/ConsensusServiceImpl.java +++ b/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/ConsensusServiceImpl.java @@ -19,7 +19,7 @@ import com.hedera.node.app.service.consensus.ConsensusService; import com.hedera.node.app.service.consensus.impl.schemas.V0490ConsensusSchema; import com.hedera.node.app.spi.RpcService; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/schemas/V0490ConsensusSchema.java b/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/schemas/V0490ConsensusSchema.java index 5cf14d857773..190ac5ef8b18 100644 --- a/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/schemas/V0490ConsensusSchema.java +++ b/hedera-node/hedera-consensus-service-impl/src/main/java/com/hedera/node/app/service/consensus/impl/schemas/V0490ConsensusSchema.java @@ -21,9 +21,9 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.node.base.TopicID; import com.hedera.hapi.node.state.consensus.Topic; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/ConsensusServiceImplTest.java b/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/ConsensusServiceImplTest.java index d4f661233c67..752841261124 100644 --- a/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/ConsensusServiceImplTest.java +++ b/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/ConsensusServiceImplTest.java @@ -22,7 +22,7 @@ import static org.mockito.Mockito.verify; import com.hedera.node.app.service.consensus.impl.ConsensusServiceImpl; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/schemas/V0490ConsensusSchemaTest.java b/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/schemas/V0490ConsensusSchemaTest.java index 1662b0e4b2f3..ea01e9a0fdfa 100644 --- a/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/schemas/V0490ConsensusSchemaTest.java +++ b/hedera-node/hedera-consensus-service-impl/src/test/java/com/hedera/node/app/service/consensus/impl/test/schemas/V0490ConsensusSchemaTest.java @@ -21,7 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import com.hedera.node.app.service.consensus.impl.schemas.V0490ConsensusSchema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.StateDefinition; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/FileServiceImpl.java b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/FileServiceImpl.java index e978ed668798..7c89fb23587a 100644 --- a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/FileServiceImpl.java +++ b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/FileServiceImpl.java @@ -21,7 +21,7 @@ import com.hedera.node.app.service.file.impl.schemas.V0490FileSchema; import com.hedera.node.app.spi.RpcService; import com.hedera.node.app.spi.workflows.SystemContext; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; import javax.inject.Inject; diff --git a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/handlers/FileGetContentsHandler.java b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/handlers/FileGetContentsHandler.java index d44406604c15..ea0fc1852af1 100644 --- a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/handlers/FileGetContentsHandler.java +++ b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/handlers/FileGetContentsHandler.java @@ -45,7 +45,7 @@ import com.hederahashgraph.api.proto.java.FeeData; import com.hederahashgraph.api.proto.java.ResponseType; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Map; diff --git a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/schemas/V0490FileSchema.java b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/schemas/V0490FileSchema.java index 3cc9ce8ac4a6..fa2401503205 100644 --- a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/schemas/V0490FileSchema.java +++ b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/schemas/V0490FileSchema.java @@ -64,10 +64,10 @@ import com.hedera.node.config.types.LongPair; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.ByteArrayInputStream; diff --git a/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/FileServiceImplTest.java b/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/FileServiceImplTest.java index 9c08facfdb20..4a18abcbd9bc 100644 --- a/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/FileServiceImplTest.java +++ b/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/FileServiceImplTest.java @@ -24,9 +24,9 @@ import com.hedera.node.app.service.file.impl.schemas.V0490FileSchema; import com.hedera.node.config.testfixtures.HederaTestConfigBuilder; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.StateDefinition; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; diff --git a/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/handlers/FileGetContentsHandlerTest.java b/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/handlers/FileGetContentsHandlerTest.java index 94b936208ab9..707e200a912b 100644 --- a/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/handlers/FileGetContentsHandlerTest.java +++ b/hedera-node/hedera-file-service-impl/src/test/java/com/hedera/node/app/service/file/impl/test/handlers/FileGetContentsHandlerTest.java @@ -49,7 +49,7 @@ import com.hedera.node.app.spi.workflows.QueryContext; import com.hedera.node.config.data.FilesConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hedera-node/hedera-file-service/src/main/java/com/hedera/node/app/service/file/ReadableUpgradeFileStore.java b/hedera-node/hedera-file-service/src/main/java/com/hedera/node/app/service/file/ReadableUpgradeFileStore.java index 172eb629ef4a..237ef618499c 100644 --- a/hedera-node/hedera-file-service/src/main/java/com/hedera/node/app/service/file/ReadableUpgradeFileStore.java +++ b/hedera-node/hedera-file-service/src/main/java/com/hedera/node/app/service/file/ReadableUpgradeFileStore.java @@ -19,8 +19,8 @@ import com.hedera.hapi.node.base.FileID; import com.hedera.hapi.node.state.file.File; import com.hedera.pbj.runtime.io.buffer.Bytes; +import com.swirlds.state.lifecycle.Schema; import com.swirlds.state.spi.ReadableQueueState; -import com.swirlds.state.spi.Schema; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.IOException; diff --git a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/FreezeServiceImpl.java b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/FreezeServiceImpl.java index b2476a476df4..64d0f9ea3193 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/FreezeServiceImpl.java +++ b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/FreezeServiceImpl.java @@ -19,7 +19,7 @@ import com.hedera.node.app.service.networkadmin.FreezeService; import com.hedera.node.app.service.networkadmin.impl.schemas.V0490FreezeSchema; import com.hedera.node.app.spi.RpcService; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/NetworkServiceImpl.java b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/NetworkServiceImpl.java index 054060824c91..96a91d7ab22a 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/NetworkServiceImpl.java +++ b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/NetworkServiceImpl.java @@ -19,7 +19,7 @@ import com.hedera.node.app.service.networkadmin.NetworkService; import com.hedera.node.app.service.networkadmin.impl.schemas.V0490NetworkSchema; import com.hedera.node.app.spi.RpcService; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490FreezeSchema.java b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490FreezeSchema.java index 96ef381754aa..bdf46b322d47 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490FreezeSchema.java +++ b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490FreezeSchema.java @@ -20,9 +20,9 @@ import com.hedera.hapi.node.base.Timestamp; import com.hedera.hapi.node.state.primitives.ProtoBytes; import com.hedera.node.app.service.networkadmin.FreezeService; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.apache.logging.log4j.LogManager; diff --git a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490NetworkSchema.java b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490NetworkSchema.java index c6e3db924f9e..d65921b60a78 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490NetworkSchema.java +++ b/hedera-node/hedera-network-admin-service-impl/src/main/java/com/hedera/node/app/service/networkadmin/impl/schemas/V0490NetworkSchema.java @@ -17,7 +17,7 @@ package com.hedera.node.app.service.networkadmin.impl.schemas; import com.hedera.hapi.node.base.SemanticVersion; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.Schema; /** * General schema for the network service. Currently a placeholder. diff --git a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/FreezeServiceImplTest.java b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/FreezeServiceImplTest.java index b69b59457938..2378250b93ad 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/FreezeServiceImplTest.java +++ b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/FreezeServiceImplTest.java @@ -27,10 +27,10 @@ import com.hedera.node.app.fixtures.state.FakeState; import com.hedera.node.app.service.networkadmin.FreezeService; import com.hedera.node.app.service.networkadmin.impl.FreezeServiceImpl; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.StateDefinition; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.StateDefinition; +import com.swirlds.state.lifecycle.info.NetworkInfo; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/NetworkServiceImplTest.java b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/NetworkServiceImplTest.java index ba3b4a7da33f..e9b7876a8f39 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/NetworkServiceImplTest.java +++ b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/NetworkServiceImplTest.java @@ -23,7 +23,7 @@ import com.hedera.node.app.service.networkadmin.NetworkService; import com.hedera.node.app.service.networkadmin.impl.NetworkServiceImpl; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/handlers/NetworkAdminHandlerTestBase.java b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/handlers/NetworkAdminHandlerTestBase.java index ca935dad2d05..262d93c21062 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/handlers/NetworkAdminHandlerTestBase.java +++ b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/handlers/NetworkAdminHandlerTestBase.java @@ -64,8 +64,8 @@ import com.hedera.node.config.data.LedgerConfig; import com.hedera.pbj.runtime.OneOf; import com.hedera.pbj.runtime.io.buffer.Bytes; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.ReadableStates; -import com.swirlds.state.spi.info.NetworkInfo; import com.swirlds.state.test.fixtures.MapReadableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; diff --git a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/schemas/V0490FreezeSchemaTest.java b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/schemas/V0490FreezeSchemaTest.java index 49be94f7b39d..b4c905723cd8 100644 --- a/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/schemas/V0490FreezeSchemaTest.java +++ b/hedera-node/hedera-network-admin-service-impl/src/test/java/com/hedera/node/app/service/networkadmin/impl/test/schemas/V0490FreezeSchemaTest.java @@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import com.hedera.node.app.service.networkadmin.impl.schemas.V0490FreezeSchema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.StateDefinition; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImpl.java b/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImpl.java index a02a09515386..56884ae4afe3 100644 --- a/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImpl.java +++ b/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImpl.java @@ -20,7 +20,7 @@ import com.hedera.node.app.service.schedule.impl.schemas.V0490ScheduleSchema; import com.hedera.node.app.service.schedule.impl.schemas.V0570ScheduleSchema; import com.hedera.node.app.spi.RpcService; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchema.java b/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchema.java index c33885aa2c1d..23b9d16e027d 100644 --- a/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchema.java +++ b/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchema.java @@ -22,9 +22,9 @@ import com.hedera.hapi.node.state.primitives.ProtoLong; import com.hedera.hapi.node.state.schedule.Schedule; import com.hedera.hapi.node.state.schedule.ScheduleList; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchema.java b/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchema.java index 078925bdbf96..9e2f4b38646b 100644 --- a/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchema.java +++ b/hedera-node/hedera-schedule-service-impl/src/main/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchema.java @@ -28,10 +28,10 @@ import com.hedera.hapi.node.state.schedule.Schedule; import com.hedera.hapi.node.state.schedule.ScheduleIdList; import com.hedera.hapi.node.state.schedule.ScheduleList; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.ReadableKVState; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Objects; diff --git a/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImplTest.java b/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImplTest.java index c281d0654437..4acea97cde43 100644 --- a/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImplTest.java +++ b/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/ScheduleServiceImplTest.java @@ -22,9 +22,9 @@ import com.hedera.node.app.service.schedule.ScheduleService; import com.hedera.node.app.service.schedule.impl.schemas.V0490ScheduleSchema; import com.hedera.node.app.service.schedule.impl.schemas.V0570ScheduleSchema; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.StateDefinition; import java.util.List; import java.util.Set; import org.assertj.core.api.BDDAssertions; diff --git a/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchemaTest.java b/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchemaTest.java index e551bb761170..811caa0007c3 100644 --- a/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchemaTest.java +++ b/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0490ScheduleSchemaTest.java @@ -29,8 +29,8 @@ import com.hedera.hapi.node.state.schedule.Schedule; import com.hedera.hapi.node.state.schedule.ScheduleList; import com.hedera.node.app.spi.fixtures.state.MapWritableStates; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.WritableStates; import com.swirlds.state.test.fixtures.MapWritableKVState; import java.util.Comparator; diff --git a/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchemaTest.java b/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchemaTest.java index 130683ced798..fec76242d254 100644 --- a/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchemaTest.java +++ b/hedera-node/hedera-schedule-service-impl/src/test/java/com/hedera/node/app/service/schedule/impl/schemas/V0570ScheduleSchemaTest.java @@ -41,8 +41,8 @@ import com.hedera.node.app.spi.fixtures.util.LoggingSubject; import com.hedera.node.app.spi.fixtures.util.LoggingTarget; import com.hedera.node.app.spi.workflows.PreCheckException; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.test.fixtures.MapReadableKVState; import com.swirlds.state.test.fixtures.MapReadableStates; import com.swirlds.state.test.fixtures.MapWritableKVState; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/ContractServiceImpl.java b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/ContractServiceImpl.java index 8ed4849de690..19535d233f9c 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/ContractServiceImpl.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/ContractServiceImpl.java @@ -25,7 +25,7 @@ import com.hedera.node.app.service.contract.impl.schemas.V0490ContractSchema; import com.hedera.node.app.service.contract.impl.schemas.V0500ContractSchema; import com.hedera.node.app.spi.AppContext; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.List; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/TransactionModule.java b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/TransactionModule.java index 2d82e37a2fc1..9bcccbc7b5f6 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/TransactionModule.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/TransactionModule.java @@ -60,7 +60,7 @@ import com.hedera.node.config.data.ContractsConfig; import com.hedera.node.config.data.HederaConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import dagger.Binds; import dagger.Module; import dagger.Provides; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/infra/HevmTransactionFactory.java b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/infra/HevmTransactionFactory.java index 195b518e4d7a..c215779d6405 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/infra/HevmTransactionFactory.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/infra/HevmTransactionFactory.java @@ -78,7 +78,7 @@ import com.hedera.node.config.data.LedgerConfig; import com.hedera.node.config.data.StakingConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import javax.inject.Inject; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0490ContractSchema.java b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0490ContractSchema.java index 9c281bd7911a..5535cdd0188d 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0490ContractSchema.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0490ContractSchema.java @@ -21,9 +21,9 @@ import com.hedera.hapi.node.state.contract.Bytecode; import com.hedera.hapi.node.state.contract.SlotKey; import com.hedera.hapi.node.state.contract.SlotValue; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0500ContractSchema.java b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0500ContractSchema.java index cfa724c0ea31..531db841eed3 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0500ContractSchema.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/schemas/V0500ContractSchema.java @@ -26,9 +26,9 @@ import com.hedera.hapi.node.state.contract.SlotKey; import com.hedera.hapi.node.state.contract.SlotValue; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; import com.swirlds.state.spi.ReadableKVState; -import com.swirlds.state.spi.Schema; import com.swirlds.state.spi.WritableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/ContractServiceImplTest.java b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/ContractServiceImplTest.java index af6151888ff4..659fd39c53ca 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/ContractServiceImplTest.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/ContractServiceImplTest.java @@ -28,8 +28,8 @@ import com.hedera.node.app.service.contract.impl.schemas.V0500ContractSchema; import com.hedera.node.app.spi.AppContext; import com.hedera.node.app.spi.signatures.SignatureVerifier; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; import java.time.InstantSource; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/exec/TransactionModuleTest.java b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/exec/TransactionModuleTest.java index a44d0edb233a..3e61a422583d 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/exec/TransactionModuleTest.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/exec/TransactionModuleTest.java @@ -68,7 +68,7 @@ import com.hedera.node.app.spi.validation.ExpiryValidator; import com.hedera.node.app.spi.workflows.ComputeDispatchFeesAsTopLevel; import com.hedera.node.app.spi.workflows.HandleContext; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import java.time.Instant; import java.util.Map; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/infra/HevmTransactionFactoryTest.java b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/infra/HevmTransactionFactoryTest.java index c8390b6e1734..87c84f80e411 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/infra/HevmTransactionFactoryTest.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/infra/HevmTransactionFactoryTest.java @@ -104,7 +104,7 @@ import com.hedera.node.app.spi.workflows.HandleException; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.common.utility.CommonUtils; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.function.Consumer; import org.hyperledger.besu.evm.gascalculator.GasCalculator; diff --git a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/schemas/V0500ContractSchemaTest.java b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/schemas/V0500ContractSchemaTest.java index 3a1eee304b50..8451e39a84aa 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/schemas/V0500ContractSchemaTest.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/test/java/com/hedera/node/app/service/contract/impl/test/schemas/V0500ContractSchemaTest.java @@ -28,7 +28,7 @@ import com.hedera.node.app.service.contract.impl.schemas.V0500ContractSchema; import com.hedera.node.app.spi.fixtures.state.MapWritableStates; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; import com.swirlds.state.test.fixtures.MapReadableKVState; import com.swirlds.state.test.fixtures.MapReadableStates; import com.swirlds.state.test.fixtures.MapWritableKVState; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/TokenServiceImpl.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/TokenServiceImpl.java index adae38fcccda..a97304243d7b 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/TokenServiceImpl.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/TokenServiceImpl.java @@ -23,7 +23,7 @@ import com.hedera.node.app.service.token.impl.schemas.V0490TokenSchema; import com.hedera.node.app.service.token.impl.schemas.V0500TokenSchema; import com.hedera.node.app.service.token.impl.schemas.V0530TokenSchema; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; import java.time.ZoneId; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/api/TokenServiceApiImpl.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/api/TokenServiceApiImpl.java index 7c2fd136c3c8..68cd0b9fa270 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/api/TokenServiceApiImpl.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/api/TokenServiceApiImpl.java @@ -52,8 +52,8 @@ import com.hedera.node.config.data.StakingConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.function.Predicate; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/staking/StakeInfoHelper.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/staking/StakeInfoHelper.java index fe0e034c2f59..04c1e0d0ef91 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/staking/StakeInfoHelper.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/staking/StakeInfoHelper.java @@ -40,8 +40,8 @@ import com.hedera.node.config.data.LedgerConfig; import com.hedera.node.config.data.StakingConfig; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.ArrayList; import java.util.List; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0490TokenSchema.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0490TokenSchema.java index 6cc08b20dd0f..c48f5a3cc208 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0490TokenSchema.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0490TokenSchema.java @@ -38,9 +38,9 @@ import com.hedera.node.config.data.LedgerConfig; import com.hedera.node.config.data.StakingConfig; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.WritableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Arrays; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0500TokenSchema.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0500TokenSchema.java index b7e2730d0d4f..0cfe9c68aa09 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0500TokenSchema.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0500TokenSchema.java @@ -24,8 +24,8 @@ import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.hapi.node.state.token.Account; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; import com.swirlds.state.spi.WritableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.SortedMap; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0530TokenSchema.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0530TokenSchema.java index 918263f4e129..0e1face5b312 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0530TokenSchema.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/schemas/V0530TokenSchema.java @@ -23,9 +23,9 @@ import com.hedera.hapi.node.state.common.EntityNumber; import com.hedera.hapi.node.state.token.AccountPendingAirdrop; import com.hedera.hapi.node.state.token.StakingNodeInfo; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.apache.logging.log4j.LogManager; diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/validators/StakingValidator.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/validators/StakingValidator.java index e7b49a490e17..3c34617184dd 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/validators/StakingValidator.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/validators/StakingValidator.java @@ -24,7 +24,7 @@ import com.hedera.hapi.node.base.AccountID; import com.hedera.node.app.service.token.ReadableAccountStore; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import javax.inject.Inject; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/TokenServiceImplTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/TokenServiceImplTest.java index ef5b1c246364..5904c39c8d1e 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/TokenServiceImplTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/TokenServiceImplTest.java @@ -26,8 +26,8 @@ import com.hedera.node.app.service.token.impl.schemas.V0490TokenSchema; import com.hedera.node.app.service.token.impl.schemas.V0500TokenSchema; import com.hedera.node.app.service.token.impl.schemas.V0530TokenSchema; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/api/TokenServiceApiImplTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/api/TokenServiceApiImplTest.java index 8380e5a64d64..22a18c6534ce 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/api/TokenServiceApiImplTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/api/TokenServiceApiImplTest.java @@ -48,10 +48,10 @@ import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; import com.swirlds.config.extensions.test.fixtures.TestConfigBuilder; +import com.swirlds.state.lifecycle.info.NetworkInfo; import com.swirlds.state.spi.WritableKVState; import com.swirlds.state.spi.WritableKVStateBase; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; import com.swirlds.state.test.fixtures.MapWritableKVState; import java.util.ArrayList; import java.util.List; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoCreateHandlerTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoCreateHandlerTest.java index 4a71b24ba8c6..e20e28b0f47e 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoCreateHandlerTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoCreateHandlerTest.java @@ -89,8 +89,8 @@ import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.common.utility.CommonUtils; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoUpdateHandlerTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoUpdateHandlerTest.java index f29e8e781472..b329d963c734 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoUpdateHandlerTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoUpdateHandlerTest.java @@ -84,8 +84,8 @@ import com.hedera.node.config.VersionedConfigImpl; import com.hedera.node.config.testfixtures.HederaTestConfigBuilder; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import java.util.List; import java.util.Map; import java.util.function.LongSupplier; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0490TokenSchemaTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0490TokenSchemaTest.java index 91506be907ab..a8e0d2810688 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0490TokenSchemaTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0490TokenSchemaTest.java @@ -41,12 +41,12 @@ import com.hedera.node.app.spi.fixtures.state.MapWritableStates; import com.hedera.pbj.runtime.io.buffer.Bytes; import com.swirlds.config.api.Configuration; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NodeInfo; import com.swirlds.state.spi.EmptyReadableStates; import com.swirlds.state.spi.WritableSingletonState; import com.swirlds.state.spi.WritableSingletonStateBase; import com.swirlds.state.spi.WritableStates; -import com.swirlds.state.spi.info.NetworkInfo; -import com.swirlds.state.spi.info.NodeInfo; import com.swirlds.state.test.fixtures.MapWritableKVState; import java.util.HashMap; import java.util.stream.IntStream; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0500TokenSchemaTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0500TokenSchemaTest.java index 7c218cdd6aa4..13cb7a49fe8d 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0500TokenSchemaTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0500TokenSchemaTest.java @@ -28,7 +28,7 @@ import com.hedera.node.app.service.token.impl.schemas.V0500TokenSchema; import com.hedera.node.app.spi.fixtures.state.MapWritableStates; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; +import com.swirlds.state.lifecycle.MigrationContext; import com.swirlds.state.test.fixtures.MapWritableKVState; import java.util.HashMap; import java.util.Map; diff --git a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0530TokenSchemaTest.java b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0530TokenSchemaTest.java index b1bef9362f71..e9c00b1752d7 100644 --- a/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0530TokenSchemaTest.java +++ b/hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/schemas/V0530TokenSchemaTest.java @@ -43,7 +43,7 @@ import com.hedera.node.app.spi.fixtures.info.FakeNetworkInfo; import com.hedera.node.app.spi.fixtures.state.MapWritableStates; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.spi.WritableSingletonState; import com.swirlds.state.spi.WritableSingletonStateBase; import com.swirlds.state.test.fixtures.MapWritableKVState; diff --git a/hedera-node/hedera-token-service/src/main/java/com/hedera/node/app/service/token/api/TokenServiceApi.java b/hedera-node/hedera-token-service/src/main/java/com/hedera/node/app/service/token/api/TokenServiceApi.java index cc3f3aed7c43..a3eb2beb5008 100644 --- a/hedera-node/hedera-token-service/src/main/java/com/hedera/node/app/service/token/api/TokenServiceApi.java +++ b/hedera-node/hedera-token-service/src/main/java/com/hedera/node/app/service/token/api/TokenServiceApi.java @@ -26,7 +26,7 @@ import com.hedera.node.app.spi.workflows.HandleException; import com.hedera.node.app.spi.workflows.record.DeleteCapableTransactionStreamBuilder; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; diff --git a/hedera-node/hedera-util-service/src/main/java/com/hedera/node/app/service/util/UtilService.java b/hedera-node/hedera-util-service/src/main/java/com/hedera/node/app/service/util/UtilService.java index 9d8bfbee04cf..3d34d0c51aa6 100644 --- a/hedera-node/hedera-util-service/src/main/java/com/hedera/node/app/service/util/UtilService.java +++ b/hedera-node/hedera-util-service/src/main/java/com/hedera/node/app/service/util/UtilService.java @@ -19,7 +19,7 @@ import com.hedera.node.app.spi.RpcService; import com.hedera.node.app.spi.RpcServiceFactory; import com.hedera.pbj.runtime.RpcServiceDefinition; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.ServiceLoader; import java.util.Set; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/hedera/embedded/fakes/FakeTssBaseService.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/hedera/embedded/fakes/FakeTssBaseService.java index 05dcc5c640f4..4e3afc9b7e36 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/hedera/embedded/fakes/FakeTssBaseService.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/hedera/embedded/fakes/FakeTssBaseService.java @@ -35,7 +35,7 @@ import com.swirlds.config.api.Configuration; import com.swirlds.platform.system.InitTrigger; import com.swirlds.state.State; -import com.swirlds.state.spi.SchemaRegistry; +import com.swirlds.state.lifecycle.SchemaRegistry; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.ArrayDeque; import java.util.List; diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/support/validators/block/StateChangesValidator.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/support/validators/block/StateChangesValidator.java index f3f8ec9bd46b..f8141a5164e3 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/support/validators/block/StateChangesValidator.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/junit/support/validators/block/StateChangesValidator.java @@ -79,8 +79,8 @@ import com.swirlds.platform.config.TransactionConfig; import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.system.InitTrigger; +import com.swirlds.state.lifecycle.Service; import com.swirlds.state.spi.CommittableWritableStates; -import com.swirlds.state.spi.Service; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.io.IOException; diff --git a/platform-sdk/swirlds-platform-core/build.gradle.kts b/platform-sdk/swirlds-platform-core/build.gradle.kts index 0d9d9c8528ad..9ac7ca3d948a 100644 --- a/platform-sdk/swirlds-platform-core/build.gradle.kts +++ b/platform-sdk/swirlds-platform-core/build.gradle.kts @@ -55,6 +55,7 @@ testModuleInfo { requires("com.swirlds.config.extensions.test.fixtures") requires("com.swirlds.platform.core.test.fixtures") requires("com.swirlds.state.api.test.fixtures") + requires("com.swirlds.state.impl.test.fixtures") requires("jakarta.inject") requires("org.assertj.core") requires("org.junit.jupiter.api") diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/validation/DefaultEventSignatureValidator.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/validation/DefaultEventSignatureValidator.java index 9ac478242a1f..a7c892c3d296 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/validation/DefaultEventSignatureValidator.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/validation/DefaultEventSignatureValidator.java @@ -32,7 +32,7 @@ import com.swirlds.platform.eventhandling.EventConfig; import com.swirlds.platform.gossip.IntakeEventCounter; import com.swirlds.platform.roster.RosterUtils; -import com.swirlds.state.spi.HapiUtils; +import com.swirlds.state.lifecycle.HapiUtils; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.security.PublicKey; diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/iss/DefaultIssDetector.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/iss/DefaultIssDetector.java index d5a357f18cf7..150ea4c9b18d 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/iss/DefaultIssDetector.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/iss/DefaultIssDetector.java @@ -44,7 +44,7 @@ import com.swirlds.platform.system.state.notifications.IssNotification.IssType; import com.swirlds.platform.util.MarkerFileWriter; import com.swirlds.platform.wiring.components.StateAndRound; -import com.swirlds.state.spi.HapiUtils; +import com.swirlds.state.lifecycle.HapiUtils; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.time.Duration; diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/PlatformStateService.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/PlatformStateService.java index 7bdccb655a90..5bf818501e6b 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/PlatformStateService.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/PlatformStateService.java @@ -23,10 +23,10 @@ import com.hedera.hapi.platform.state.PlatformState; import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.state.service.schemas.V0540PlatformStateSchema; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; +import com.swirlds.state.lifecycle.Service; import com.swirlds.state.merkle.singleton.SingletonNode; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; -import com.swirlds.state.spi.Service; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Collection; import java.util.List; diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540PlatformStateSchema.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540PlatformStateSchema.java index 767ebb4bea9e..caf3f69b2079 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540PlatformStateSchema.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540PlatformStateSchema.java @@ -20,9 +20,9 @@ import com.hedera.hapi.platform.state.ConsensusSnapshot; import com.hedera.hapi.platform.state.PlatformState; import com.hedera.pbj.runtime.io.buffer.Bytes; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540RosterSchema.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540RosterSchema.java index aba7c415297e..023becea9a4c 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540RosterSchema.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/service/schemas/V0540RosterSchema.java @@ -23,9 +23,9 @@ import com.hedera.hapi.node.state.primitives.ProtoBytes; import com.hedera.hapi.node.state.roster.Roster; import com.hedera.hapi.node.state.roster.RosterState; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; import org.apache.logging.log4j.LogManager; diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/system/events/DefaultBirthRoundMigrationShim.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/system/events/DefaultBirthRoundMigrationShim.java index 25fb3173bb0c..a2b29da9fa84 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/system/events/DefaultBirthRoundMigrationShim.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/system/events/DefaultBirthRoundMigrationShim.java @@ -23,7 +23,7 @@ import com.swirlds.common.metrics.SpeedometerMetric; import com.swirlds.platform.event.PlatformEvent; import com.swirlds.platform.system.SoftwareVersion; -import com.swirlds.state.spi.HapiUtils; +import com.swirlds.state.lifecycle.HapiUtils; import edu.umd.cs.findbugs.annotations.NonNull; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/platform-sdk/swirlds-platform-core/src/main/java/module-info.java b/platform-sdk/swirlds-platform-core/src/main/java/module-info.java index 0696e4782cf7..5866361c65d0 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/module-info.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/module-info.java @@ -135,6 +135,7 @@ requires transitive com.swirlds.config.api; requires transitive com.swirlds.metrics.api; requires transitive com.swirlds.state.api; + requires transitive com.swirlds.state.impl; requires transitive com.fasterxml.jackson.annotation; requires transitive com.fasterxml.jackson.databind; requires transitive com.hedera.pbj.runtime; diff --git a/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/MerkleStateRootTest.java b/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/MerkleStateRootTest.java index a7e750460635..6df4d7d7b536 100644 --- a/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/MerkleStateRootTest.java +++ b/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/MerkleStateRootTest.java @@ -62,12 +62,12 @@ import com.swirlds.platform.test.fixtures.state.TestSchema; import com.swirlds.state.State; import com.swirlds.state.StateChangeListener; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.merkle.StateMetadata; import com.swirlds.state.spi.CommittableWritableStates; import com.swirlds.state.spi.ReadableKVState; import com.swirlds.state.spi.ReadableQueueState; import com.swirlds.state.spi.ReadableSingletonState; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.spi.WritableKVState; import com.swirlds.state.spi.WritableQueueState; import com.swirlds.state.spi.WritableSingletonState; diff --git a/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/service/PlatformStateServiceTest.java b/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/service/PlatformStateServiceTest.java index 0c672ca63468..2181da3a2fd0 100644 --- a/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/service/PlatformStateServiceTest.java +++ b/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/service/PlatformStateServiceTest.java @@ -26,9 +26,9 @@ import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.state.service.schemas.V0540PlatformStateSchema; import com.swirlds.platform.system.SoftwareVersion; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.SchemaRegistry; import com.swirlds.state.merkle.singleton.SingletonNode; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.SchemaRegistry; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; diff --git a/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/FakeMerkleStateLifecycles.java b/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/FakeMerkleStateLifecycles.java index 32ed944f8acf..cee79048ec12 100644 --- a/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/FakeMerkleStateLifecycles.java +++ b/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/FakeMerkleStateLifecycles.java @@ -36,13 +36,13 @@ import com.swirlds.platform.system.address.AddressBook; import com.swirlds.platform.system.events.Event; import com.swirlds.state.State; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.merkle.StateMetadata; import com.swirlds.state.merkle.singleton.SingletonNode; import com.swirlds.state.merkle.singleton.StringLeaf; import com.swirlds.state.merkle.singleton.ValueLeaf; import com.swirlds.state.spi.CommittableWritableStates; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Collections; diff --git a/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/MerkleTestBase.java b/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/MerkleTestBase.java index fd9154d9d8a0..1269f02b1c7d 100644 --- a/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/MerkleTestBase.java +++ b/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/MerkleTestBase.java @@ -25,12 +25,12 @@ import com.swirlds.platform.state.MerkleStateRoot; import com.swirlds.platform.system.BasicSoftwareVersion; import com.swirlds.platform.system.SoftwareVersion; +import com.swirlds.state.lifecycle.StateDefinition; import com.swirlds.state.merkle.StateMetadata; import com.swirlds.state.merkle.disk.OnDiskKey; import com.swirlds.state.merkle.disk.OnDiskValue; import com.swirlds.state.merkle.memory.InMemoryKey; import com.swirlds.state.merkle.memory.InMemoryValue; -import com.swirlds.state.spi.StateDefinition; import com.swirlds.state.test.fixtures.StateTestBase; import com.swirlds.virtualmap.VirtualMap; import java.util.function.Function; diff --git a/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/TestSchema.java b/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/TestSchema.java index 38478fdc553e..d964412b1696 100644 --- a/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/TestSchema.java +++ b/platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/TestSchema.java @@ -17,9 +17,9 @@ package com.swirlds.platform.test.fixtures.state; import com.hedera.hapi.node.base.SemanticVersion; -import com.swirlds.state.spi.MigrationContext; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.MigrationContext; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.HashSet; diff --git a/platform-sdk/swirlds-platform-core/src/testFixtures/java/module-info.java b/platform-sdk/swirlds-platform-core/src/testFixtures/java/module-info.java index 360dfe6e78da..1c18f5eaadfb 100644 --- a/platform-sdk/swirlds-platform-core/src/testFixtures/java/module-info.java +++ b/platform-sdk/swirlds-platform-core/src/testFixtures/java/module-info.java @@ -4,14 +4,16 @@ requires transitive com.swirlds.common; requires transitive com.swirlds.merkle; requires transitive com.swirlds.platform.core; - requires transitive com.swirlds.state.api.test.fixtures; requires transitive com.swirlds.state.api; + requires transitive com.swirlds.state.impl.test.fixtures; + requires transitive com.swirlds.state.impl; requires transitive com.swirlds.virtualmap; requires com.swirlds.base; requires com.swirlds.config.api; requires com.swirlds.config.extensions.test.fixtures; requires com.swirlds.logging; requires com.swirlds.merkledb; + requires com.swirlds.state.api.test.fixtures; requires com.hedera.pbj.runtime; requires org.apache.logging.log4j; requires org.junit.jupiter.api; diff --git a/platform-sdk/swirlds-state-api/build.gradle.kts b/platform-sdk/swirlds-state-api/build.gradle.kts index 3a3e781966ee..93346a69e67c 100644 --- a/platform-sdk/swirlds-state-api/build.gradle.kts +++ b/platform-sdk/swirlds-state-api/build.gradle.kts @@ -24,7 +24,9 @@ testModuleInfo { requires("com.swirlds.state.api.test.fixtures") requires("org.assertj.core") requires("org.junit.jupiter.api") - requires("org.junit.jupiter.params") + requires("org.mockito") + requires("org.mockito.junit.jupiter") + requires("com.swirlds.state.api.test.fixtures") requires("org.mockito") requires("org.mockito.junit.jupiter") runtimeOnly("com.swirlds.config.api") diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/HapiUtils.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/HapiUtils.java similarity index 99% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/HapiUtils.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/HapiUtils.java index 070a3409aaac..106836c84e62 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/HapiUtils.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/HapiUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.lifecycle; import com.hedera.hapi.node.base.AccountID; import com.hedera.hapi.node.base.SemanticVersion; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/MigrationContext.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/MigrationContext.java similarity index 95% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/MigrationContext.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/MigrationContext.java index 779df37300a7..556396af2566 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/MigrationContext.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/MigrationContext.java @@ -14,11 +14,13 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.lifecycle; import com.hedera.hapi.node.base.SemanticVersion; import com.swirlds.config.api.Configuration; -import com.swirlds.state.spi.info.NetworkInfo; +import com.swirlds.state.lifecycle.info.NetworkInfo; +import com.swirlds.state.spi.ReadableStates; +import com.swirlds.state.spi.WritableStates; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Map; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/Schema.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/Schema.java similarity index 97% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/Schema.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/Schema.java index 663f0d63e032..db134d58262b 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/Schema.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/Schema.java @@ -14,11 +14,13 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.lifecycle; import com.hedera.hapi.node.base.SemanticVersion; import com.hedera.pbj.runtime.Codec; import com.swirlds.config.api.Configuration; +import com.swirlds.state.spi.ReadableKVState; +import com.swirlds.state.spi.ReadableStates; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Collections; import java.util.Objects; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/SchemaRegistry.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/SchemaRegistry.java similarity index 98% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/SchemaRegistry.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/SchemaRegistry.java index 86547702c54f..c8378d3c111d 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/SchemaRegistry.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/SchemaRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.lifecycle; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Collection; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/Service.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/Service.java similarity index 98% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/Service.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/Service.java index 8552f4e2c4fd..11624b2969af 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/Service.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/Service.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.lifecycle; import edu.umd.cs.findbugs.annotations.NonNull; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/StateDefinition.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/StateDefinition.java similarity index 98% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/StateDefinition.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/StateDefinition.java index dbf4ca4db311..e8b91133df49 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/StateDefinition.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/StateDefinition.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.lifecycle; import com.hedera.pbj.runtime.Codec; +import com.swirlds.state.spi.ReadableKVState; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/info/NetworkInfo.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/info/NetworkInfo.java similarity index 97% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/info/NetworkInfo.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/info/NetworkInfo.java index 2bdb24b89cb0..9a535fcf002b 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/info/NetworkInfo.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/info/NetworkInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.swirlds.state.spi.info; +package com.swirlds.state.lifecycle.info; import com.hedera.hapi.node.state.roster.Roster; import com.hedera.pbj.runtime.io.buffer.Bytes; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/info/NodeInfo.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/info/NodeInfo.java similarity index 98% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/info/NodeInfo.java rename to platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/info/NodeInfo.java index 8f6b2155e0ff..ef8e203cc9ef 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/info/NodeInfo.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/info/NodeInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.swirlds.state.spi.info; +package com.swirlds.state.lifecycle.info; import com.hedera.hapi.node.base.AccountID; import com.hedera.hapi.node.base.ServiceEndpoint; diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/ReadableKVState.java b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/ReadableKVState.java index dfb596216235..05c3c3b6eba1 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/ReadableKVState.java +++ b/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/spi/ReadableKVState.java @@ -16,6 +16,7 @@ package com.swirlds.state.spi; +import com.swirlds.state.lifecycle.Schema; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Iterator; @@ -34,8 +35,8 @@ */ public interface ReadableKVState { /** - * Gets the "state key" that uniquely identifies this {@link ReadableKVState} within the {@link - * Schema} which are scoped to the service implementation. The key is therefore not globally + * Gets the "state key" that uniquely identifies this {@link ReadableKVState} within the + * {@link Schema} which are scoped to the service implementation. The key is therefore not globally * unique, only unique within the service implementation itself. * *

The call is idempotent, always returning the same value. It must never return null. diff --git a/platform-sdk/swirlds-state-api/src/main/java/module-info.java b/platform-sdk/swirlds-state-api/src/main/java/module-info.java index 78185409b14a..997521179b94 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/module-info.java +++ b/platform-sdk/swirlds-state-api/src/main/java/module-info.java @@ -1,21 +1,13 @@ module com.swirlds.state.api { exports com.swirlds.state; exports com.swirlds.state.spi; + exports com.swirlds.state.lifecycle.info; exports com.swirlds.state.spi.metrics; - exports com.swirlds.state.spi.info; - exports com.swirlds.state.merkle.singleton; - exports com.swirlds.state.merkle.queue; - exports com.swirlds.state.merkle.memory; - exports com.swirlds.state.merkle.disk; - exports com.swirlds.state.merkle; + exports com.swirlds.state.lifecycle; 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 org.apache.logging.log4j; requires static transitive com.github.spotbugs.annotations; } diff --git a/platform-sdk/swirlds-state-api/src/testFixtures/java/module-info.java b/platform-sdk/swirlds-state-api/src/testFixtures/java/module-info.java index 9f7d60871318..2f13b9a1d23a 100644 --- a/platform-sdk/swirlds-state-api/src/testFixtures/java/module-info.java +++ b/platform-sdk/swirlds-state-api/src/testFixtures/java/module-info.java @@ -1,16 +1,7 @@ open module com.swirlds.state.api.test.fixtures { - requires transitive com.hedera.node.hapi; - requires transitive com.swirlds.common; - requires transitive com.swirlds.merkle; requires transitive com.swirlds.state.api; - requires transitive com.swirlds.virtualmap; requires transitive com.hedera.pbj.runtime; - requires transitive org.junit.jupiter.params; - requires com.swirlds.config.api; - requires com.swirlds.merkledb; - requires org.junit.jupiter.api; requires static transitive com.github.spotbugs.annotations; exports com.swirlds.state.test.fixtures; - exports com.swirlds.state.test.fixtures.merkle; } diff --git a/platform-sdk/swirlds-state-impl/build.gradle.kts b/platform-sdk/swirlds-state-impl/build.gradle.kts new file mode 100644 index 000000000000..399424faf0df --- /dev/null +++ b/platform-sdk/swirlds-state-impl/build.gradle.kts @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Hedera Hashgraph, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("com.hedera.gradle.platform") + id("com.hedera.gradle.platform-publish") + id("com.hedera.gradle.feature.test-fixtures") +} + +testModuleInfo { + requires("org.assertj.core") + requires("org.junit.jupiter.api") + requires("com.swirlds.state.api.test.fixtures") + requires("com.swirlds.state.impl.test.fixtures") + requires("org.junit.jupiter.api") + requires("org.junit.jupiter.params") + requires("org.mockito") + requires("org.mockito.junit.jupiter") + runtimeOnly("com.swirlds.config.api") + runtimeOnly("com.swirlds.config.impl") + requiresStatic("com.github.spotbugs.annotations") +} diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/StateMetadata.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/StateMetadata.java similarity index 98% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/StateMetadata.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/StateMetadata.java index 1dcec977cec6..e1b17e7919d7 100644 --- a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/StateMetadata.java +++ b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/StateMetadata.java @@ -16,8 +16,8 @@ package com.swirlds.state.merkle; -import com.swirlds.state.spi.Schema; -import com.swirlds.state.spi.StateDefinition; +import com.swirlds.state.lifecycle.Schema; +import com.swirlds.state.lifecycle.StateDefinition; import edu.umd.cs.findbugs.annotations.NonNull; /** diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/StateUtils.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/StateUtils.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/StateUtils.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/StateUtils.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskIterator.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskIterator.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskIterator.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskIterator.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskKey.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskKey.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskKey.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskKey.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskKeySerializer.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskKeySerializer.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskKeySerializer.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskKeySerializer.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskReadableKVState.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskReadableKVState.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskReadableKVState.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskReadableKVState.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskValue.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskValue.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskValue.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskValue.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskValueSerializer.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskValueSerializer.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskValueSerializer.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskValueSerializer.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskWritableKVState.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskWritableKVState.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/disk/OnDiskWritableKVState.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/disk/OnDiskWritableKVState.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/logging/StateLogger.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/logging/StateLogger.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/logging/StateLogger.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/logging/StateLogger.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryKey.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryKey.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryKey.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryKey.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryReadableKVState.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryReadableKVState.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryReadableKVState.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryReadableKVState.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryValue.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryValue.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryValue.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryValue.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryWritableKVState.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryWritableKVState.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/memory/InMemoryWritableKVState.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/memory/InMemoryWritableKVState.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/queue/QueueNode.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/queue/QueueNode.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/queue/QueueNode.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/queue/QueueNode.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/queue/ReadableQueueStateImpl.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/queue/ReadableQueueStateImpl.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/queue/ReadableQueueStateImpl.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/queue/ReadableQueueStateImpl.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/queue/WritableQueueStateImpl.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/queue/WritableQueueStateImpl.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/queue/WritableQueueStateImpl.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/queue/WritableQueueStateImpl.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/ReadableSingletonStateImpl.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/ReadableSingletonStateImpl.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/ReadableSingletonStateImpl.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/ReadableSingletonStateImpl.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/SingletonNode.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/SingletonNode.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/SingletonNode.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/SingletonNode.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/StringLeaf.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/StringLeaf.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/StringLeaf.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/StringLeaf.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/ValueLeaf.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/ValueLeaf.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/ValueLeaf.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/ValueLeaf.java diff --git a/platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/WritableSingletonStateImpl.java b/platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/WritableSingletonStateImpl.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/merkle/singleton/WritableSingletonStateImpl.java rename to platform-sdk/swirlds-state-impl/src/main/java/com/swirlds/state/merkle/singleton/WritableSingletonStateImpl.java diff --git a/platform-sdk/swirlds-state-impl/src/main/java/module-info.java b/platform-sdk/swirlds-state-impl/src/main/java/module-info.java new file mode 100644 index 000000000000..a899fb136f79 --- /dev/null +++ b/platform-sdk/swirlds-state-impl/src/main/java/module-info.java @@ -0,0 +1,17 @@ +module com.swirlds.state.impl { + exports com.swirlds.state.merkle.singleton; + exports com.swirlds.state.merkle.queue; + exports com.swirlds.state.merkle.memory; + exports com.swirlds.state.merkle.disk; + exports com.swirlds.state.merkle; + + requires transitive com.hedera.node.hapi; + requires transitive com.swirlds.common; + requires transitive com.swirlds.merkle; + requires transitive com.swirlds.state.api; + requires transitive com.swirlds.virtualmap; + requires transitive com.hedera.pbj.runtime; + requires com.swirlds.fcqueue; + requires org.apache.logging.log4j; + requires static transitive com.github.spotbugs.annotations; +} diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/spi/HapiUtilsTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/impl/HapiUtilsTest.java similarity index 95% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/spi/HapiUtilsTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/impl/HapiUtilsTest.java index 524bf22514d8..47734517553f 100644 --- a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/spi/HapiUtilsTest.java +++ b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/impl/HapiUtilsTest.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.swirlds.state.spi; +package com.swirlds.state.impl; -import static com.swirlds.state.spi.HapiUtils.SEMANTIC_VERSION_COMPARATOR; +import static com.swirlds.state.lifecycle.HapiUtils.SEMANTIC_VERSION_COMPARATOR; import static org.assertj.core.api.Assertions.assertThat; import com.hedera.hapi.node.base.SemanticVersion; diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/StateUtilsTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/StateUtilsTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/StateUtilsTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/StateUtilsTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/disk/OnDiskKeySerializerTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/disk/OnDiskKeySerializerTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/disk/OnDiskKeySerializerTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/disk/OnDiskKeySerializerTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/disk/OnDiskReadableStateTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/disk/OnDiskReadableStateTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/disk/OnDiskReadableStateTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/disk/OnDiskReadableStateTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/disk/OnDiskWritableStateTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/disk/OnDiskWritableStateTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/disk/OnDiskWritableStateTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/disk/OnDiskWritableStateTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/memory/InMemoryReadableStateTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/memory/InMemoryReadableStateTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/memory/InMemoryReadableStateTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/memory/InMemoryReadableStateTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/memory/InMemoryWritableStateTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/memory/InMemoryWritableStateTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/memory/InMemoryWritableStateTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/memory/InMemoryWritableStateTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/queue/QueueNodeTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/queue/QueueNodeTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/queue/QueueNodeTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/queue/QueueNodeTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/singleton/SingletonNodeTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/singleton/SingletonNodeTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/singleton/SingletonNodeTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/singleton/SingletonNodeTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/singleton/StringLeafTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/singleton/StringLeafTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/singleton/StringLeafTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/singleton/StringLeafTest.java diff --git a/platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/singleton/ValueLeafTest.java b/platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/singleton/ValueLeafTest.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/test/java/com/swirlds/state/merkle/singleton/ValueLeafTest.java rename to platform-sdk/swirlds-state-impl/src/test/java/com/swirlds/state/merkle/singleton/ValueLeafTest.java diff --git a/platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/MerkleTestBase.java b/platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/MerkleTestBase.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/MerkleTestBase.java rename to platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/MerkleTestBase.java diff --git a/platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestArgumentUtils.java b/platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestArgumentUtils.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestArgumentUtils.java rename to platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestArgumentUtils.java diff --git a/platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestLongCodec.java b/platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestLongCodec.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestLongCodec.java rename to platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestLongCodec.java diff --git a/platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestStringCodec.java b/platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestStringCodec.java similarity index 100% rename from platform-sdk/swirlds-state-api/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestStringCodec.java rename to platform-sdk/swirlds-state-impl/src/testFixtures/java/com/swirlds/state/test/fixtures/merkle/TestStringCodec.java diff --git a/platform-sdk/swirlds-state-impl/src/testFixtures/java/module-info.java b/platform-sdk/swirlds-state-impl/src/testFixtures/java/module-info.java new file mode 100644 index 000000000000..933c4c3a41d2 --- /dev/null +++ b/platform-sdk/swirlds-state-impl/src/testFixtures/java/module-info.java @@ -0,0 +1,16 @@ +open module com.swirlds.state.impl.test.fixtures { + requires transitive com.hedera.node.hapi; + requires transitive com.swirlds.common; + requires transitive com.swirlds.merkle; + requires transitive com.swirlds.state.api.test.fixtures; + requires transitive com.swirlds.state.impl; + requires transitive com.swirlds.virtualmap; + requires transitive com.hedera.pbj.runtime; + requires transitive org.junit.jupiter.params; + requires com.swirlds.config.api; + requires com.swirlds.merkledb; + requires org.junit.jupiter.api; + requires static transitive com.github.spotbugs.annotations; + + exports com.swirlds.state.test.fixtures.merkle; +}