ethereum / wiki

The Ethereum Wiki
https://www.ethereum.org
14.75k stars 2.57k forks source link

DAG content differs #643

Open Nreif opened 5 years ago

Nreif commented 5 years ago

Hi,

I have the problem that the Python Program provided here delivers other DAG contents and sizes than the DAG generator in geth.exe, Version 1.8.20.

Here some examples:

Results from Program Results from geth.exe presented here: Version 1.8.20:

DAG of 5. Epoch:

Size (from get_full_size): Real File Size: 1115684224 1115684232

First Bytes:

DF C3 CB A7 FE CA DD BA 9D 1E ED 6D AD DE E1 FE 46 54 EF 22 74 63 03 FB 78 64 B7 2E EC 5B C5 50 99 E3 FF F8 12 62 CA 45 BF 1A C8 A0 96 33 08 F7 76 CA 1C 24 C6 B7 5C 3B 2C B5 D9 F4 E8 67 E4 80 12 C7 CA DD C8 9C E1 9C 14 4A BD E8 59 6E 0B 22 18 D3 13 B4 B1 E2 E3 13 E7 4B 39 3C 56 CF 8A A8

DAG of 73. Epoch:

Size (from get_full_size): Real File Size: 1686109312 1686109320

First Bytes:

FB AF B7 85 FE CA DD BA AD 5A 7D B4 AD DE E1 FE 81 FF 5E FC 60 3C AC B8 49 CF 51 8E A9 2B DE 0B 6A A5 49 55 AC 2E 74 BA AB 82 57 28 99 67 31 92 59 C9 D0 6E A0 73 1E 64 AF 2F 6C C7 AF 7E 82 48 1B F4 53 25 06 AA 8E AE 6A 69 AD FA D8 F4 C9 CE 3C CA 19 E7 27 58 94 5B F7 DD C6 3E 12 FA FA 1F

DAG of 180. Epoch:

Size (from get_full_size): Real File Size: 2583686528 2583686536

Has anybody an idea for the reason of these differences??

Norbert

Nreif commented 5 years ago

Sorry, but the tool destroyed the formatting of my last post. Here is the content how it was planned to look like:

dagcompare

ChrisChinchilla commented 4 years ago

Hey @Nreif could you be a little clearer? Which Python application?

manwapri commented 4 years ago

Hey,

could you please tell me the code to collect dag into file.

i m using below code but getting attribute error,

============================ import pyethash

with open("cache","rb") as fcache: cache = fcache.read()

data_size = pyethash.get_full_size(0)

print("Generating dataset (DAG) of size %d." % data_size) dataset = pyethash.calc_dataset_bytes(data_size, cache)

with open("dataset","w+b") as fcache: fcache.write(dataset)

============================================================== AttributeError: module 'pyethash' has no attribute 'get_full_size'