Search in sources :

Example 1 with PrivateMigrationBlockProcessor

use of org.hyperledger.besu.ethereum.privacy.storage.migration.PrivateMigrationBlockProcessor in project besu by hyperledger.

the class PrivateStorageMigrationBuilder method build.

public PrivateStorageMigration build() {
    final Blockchain blockchain = besuController.getProtocolContext().getBlockchain();
    final Address privacyPrecompileAddress = privacyParameters.getPrivacyAddress();
    final ProtocolSchedule protocolSchedule = besuController.getProtocolSchedule();
    final WorldStateArchive publicWorldStateArchive = besuController.getProtocolContext().getWorldStateArchive();
    final PrivateStateStorage privateStateStorage = privacyParameters.getPrivateStateStorage();
    final LegacyPrivateStateStorage legacyPrivateStateStorage = privacyParameters.getPrivateStorageProvider().createLegacyPrivateStateStorage();
    final PrivateStateRootResolver privateStateRootResolver = privacyParameters.getPrivateStateRootResolver();
    return new PrivateStorageMigration(blockchain, privacyPrecompileAddress, protocolSchedule, publicWorldStateArchive, privateStateStorage, privateStateRootResolver, legacyPrivateStateStorage, PrivateMigrationBlockProcessor::new);
}
Also used : Address(org.hyperledger.besu.datatypes.Address) WorldStateArchive(org.hyperledger.besu.ethereum.worldstate.WorldStateArchive) PrivateStorageMigration(org.hyperledger.besu.ethereum.privacy.storage.migration.PrivateStorageMigration) Blockchain(org.hyperledger.besu.ethereum.chain.Blockchain) PrivateStateRootResolver(org.hyperledger.besu.ethereum.privacy.PrivateStateRootResolver) PrivateMigrationBlockProcessor(org.hyperledger.besu.ethereum.privacy.storage.migration.PrivateMigrationBlockProcessor) ProtocolSchedule(org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule) LegacyPrivateStateStorage(org.hyperledger.besu.ethereum.privacy.storage.LegacyPrivateStateStorage) PrivateStateStorage(org.hyperledger.besu.ethereum.privacy.storage.PrivateStateStorage) LegacyPrivateStateStorage(org.hyperledger.besu.ethereum.privacy.storage.LegacyPrivateStateStorage)

Aggregations

Address (org.hyperledger.besu.datatypes.Address)1 Blockchain (org.hyperledger.besu.ethereum.chain.Blockchain)1 ProtocolSchedule (org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule)1 PrivateStateRootResolver (org.hyperledger.besu.ethereum.privacy.PrivateStateRootResolver)1 LegacyPrivateStateStorage (org.hyperledger.besu.ethereum.privacy.storage.LegacyPrivateStateStorage)1 PrivateStateStorage (org.hyperledger.besu.ethereum.privacy.storage.PrivateStateStorage)1 PrivateMigrationBlockProcessor (org.hyperledger.besu.ethereum.privacy.storage.migration.PrivateMigrationBlockProcessor)1 PrivateStorageMigration (org.hyperledger.besu.ethereum.privacy.storage.migration.PrivateStorageMigration)1 WorldStateArchive (org.hyperledger.besu.ethereum.worldstate.WorldStateArchive)1