[Ethereum] see the current DAG size

dagmining

Where do I see the current, exact DAG size? Is it being tracked on a website somewhere, or is it something I can check on my miner?

Best Answer

The DAG size is actually calculated by a fixed formula. You can find more details here. The function that does the calculation is:

def get_full_size(block_number):
    sz = DATASET_BYTES_INIT + DATASET_BYTES_GROWTH * (block_number // EPOCH_LENGTH)
    sz -= MIX_BYTES
    while not isprime(sz / MIX_BYTES):
        sz -= 2 * MIX_BYTES
    return sz

To make it easier, look for current block number (eg. 121,000), divide it by 30,000 (so it's 4) and look up the size indexed 4 in the data_sizes array at the end of the link. In our example, it should be 1107293056 bytes.

This size is the DAG size. However if you meant size of the current DAG file, it should have extra 8 bytes (magic number at the beginning of the file which is 8 bytes, documented here). So the DAG file is 1107293056 + 8 = 1107293064 bytes.

@Richard's answer is actually the DAG file size.