class ValidatorDataProvider {

  public SafeFuture<ValidatorBlockResult> submitSignedBlock(
      final SignedBeaconBlock signedBeaconBlock) {
    return blockImporter
        .importBlock(signedBeaconBlock.asInternalSignedBeaconBlock())
        .thenApply(
            blockImportResult -> {
              int responseCode;
              Bytes32 hashRoot = null;

              if (!blockImportResult.isSuccessful()) {
                if (blockImportResult.getFailureReason()
                    == BlockImportResult.FailureReason.INTERNAL_ERROR) {
                  responseCode = 500;
                } else {
                  responseCode = 202;
                }
              } else {
                responseCode = 200;
                hashRoot = blockImportResult.getBlock().getMessage().hash_tree_root();
              }

              return new ValidatorBlockResult(
                  responseCode, blockImportResult.getFailureCause(), Optional.ofNullable(hashRoot));
            });
  }

  public  ValidatorDataProvider(
      final ValidatorApiChannel validatorApiChannel,
      final BlockImporter blockImporter,
      final CombinedChainDataClient combinedChainDataClient);

}