class StateGenerationTask implements CacheableTask<Bytes32, SignedBlockAndState> {

  @Override
  public SafeFuture<Optional<SignedBlockAndState>> performTask() {
    return resolveAgainstLatestEpochBoundary()
        .thenCompose(StateGenerationTask::regenerateState)
        .thenApply(Optional::of);
  }

  public  StateGenerationTask(
      final Bytes32 blockRoot,
      final HashTree tree,
      final SignedBlockAndState baseBlockAndState,
      final Optional<Bytes32> epochBoundaryRoot,
      final BlockProvider blockProvider,
      final StateAndBlockProvider stateAndBlockProvider);

}