class StateGenerator {

  public SafeFuture<SignedBlockAndState> regenerateStateForBlock(final Bytes32 blockRoot) {
    final int blockCount = blockTree.size();
    LOG.info("Regenerate state for block {} by replaying {} blocks", blockRoot, blockCount);
    final long startTime = System.currentTimeMillis();

    return chainStateGenerator
        .generateTargetState(blockRoot)
        .thenPeek(
            result ->
                LOG.info(
                    "Completed regeneration of block {} at slot {} by replaying {} blocks. Took {}ms",
                    blockRoot,
                    result.getSlot(),
                    blockCount,
                    System.currentTimeMillis() - startTime));
  }

  private  StateGenerator(
      final HashTree blockTree,
      final BlockProvider blockProvider,
      final AsyncChainStateGenerator chainStateGenerator,
      final StateCache stateCache,
      final int blockBatchSize);

}