0

I have chfast/ethash [https://github.com/chfast/ethash.git] repo

=======================================

chfast/ethash : output

[root@localhost build]# ./bin/ethash-fakeminer

Fakeminer Benchmark

Parameters:

dataset: full

threads: 12

blocks: 10

block time: 6

batch size: 100

start nonce: 0

Progress:

              |-----    hashrate    -----|  |-----    bandwidth   -----|

epoch block current average current average

  0        0      2.80 kh/s     2.80 kh/s      0.02 GiB/s    0.02 GiB/s

  0        1      3.80 kh/s     3.30 kh/s      0.03 GiB/s    0.03 GiB/s

  0        2      4.55 kh/s     3.72 kh/s      0.04 GiB/s    0.03 GiB/s

  0        3      5.82 kh/s     4.24 kh/s      0.05 GiB/s    0.03 GiB/s

  0        4      7.70 kh/s     4.93 kh/s      0.06 GiB/s    0.04 GiB/s

  0        5     11.72 kh/s     6.06 kh/s      0.09 GiB/s    0.05 GiB/s

  0        6     27.08 kh/s     9.07 kh/s      0.21 GiB/s    0.07 GiB/s

  0        7    347.75 kh/s    51.40 kh/s      2.72 GiB/s    0.40 GiB/s

  0        8    722.35 kh/s   125.95 kh/s      5.64 GiB/s    0.98 GiB/s

  0        9    722.22 kh/s   185.58 kh/s      5.64 GiB/s    1.45 GiB/s

Summary:

time: 60.00 s

latest hashrate: 722.22 kh/s

average hashrate: 185.58 kh/s

latest memory bandwitdh: 5.64 GiB/s

average memory bandwitdh: 1.45 GiB/s

[root@localhost build]#

=======================================

and i am trying to generate dag using below python code,

==============================

import pyethash

with open("cache","rb") as fcache:

    cache = fcache.read()

//comment// Using same block 0 from benchmark code

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)

==============================

getting below errors:

====================================

error no. 1

[root@localhost build]# python dag_file.py

Traceback (most recent call last):

File "dag_file.py", line 3, in

with open("cache","rb") as fcache:

IOError: [Errno 2] No such file or directory: 'cache'

I am not sure but i have resolved it by creating file named "cache", i have pasted the "chfast/ethash : output" into this file.

after running code again:

error no 2

[root@localhost build]# python dag_file.py

Traceback (most recent call last):

File "dag_file.py", line 7, in

data_size = pyethash.get_full_size(0)

AttributeError: 'module' object has no attribute 'get_full_size'

the module pyethash, contains only 3 attributes get_seedhash, hashimoto_light, mkcache_bytes

I have already tried codes in "https://github.com/ethereum/wiki/wiki/Ethash" nothis is generating.

By default pyther version is 2.7 and i have separately installed 3.8.2, getting error in both.

Kindly suggest.

1 Answers1

0

Chfast's Fakeminer is only used to benchmark a system, It can not be used to generate the DAG items.

You can use web3.py to generate the DAG, see https://github.com/ethereum/web3.py/blob/master/docs/web3.miner.rst