public static long datasetSize(final long epoch) {
    long size = epoch * DATASET_GROWTH_BYTES + DATASET_INIT_BYTES - MIX_BYTES;
    while (!isPrime(Long.divideUnsigned(size, MIX_BYTES))) {
      size -= 2 * MIX_BYTES;
    }
    return size;
  }
Calculates EthHash DataSet size at a given epoch.

@param epoch EthHash Epoch
@return DataSet size
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/EthHash.java