class PrivacyBlockProcessor implements BlockProcessor {

  @Override
  public Result processBlock(
      final Blockchain blockchain,
      final MutableWorldState worldState,
      final BlockHeader blockHeader,
      final List<Transaction> transactions,
      final List<BlockHeader> ommers,
      final PrivateMetadataUpdater privateMetadataUpdater) {

    if (privateMetadataUpdater != null) {
      throw new IllegalArgumentException("PrivateMetadataUpdater passed in is not null.");
    }

    maybeRehydrate(blockchain, blockHeader, transactions);

    final PrivateMetadataUpdater metadataUpdater =
        new PrivateMetadataUpdater(blockHeader, privateStateStorage);

    final Result result =
        blockProcessor.processBlock(
            blockchain, worldState, blockHeader, transactions, ommers, metadataUpdater);
    metadataUpdater.commit();
    return result;
  }

  public  PrivacyBlockProcessor(
      final BlockProcessor blockProcessor,
      final ProtocolSchedule protocolSchedule,
      final Enclave enclave,
      final PrivateStateStorage privateStateStorage,
      final WorldStateArchive privateWorldStateArchive,
      final PrivateStateRootResolver privateStateRootResolver);

}