cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
igor_lima
Visitor
Visitor
321 Views
Registered: ‎05-10-2019

Problem in "Busting FPGA Blockchain Myths Part 3: Importing Ethash Code" Tutorial

Hi there, I followed all the steps in the tutorial series Busting FPGA Blockcahin Myths, however at the end of this tutorial the python code provided does not work(https://developer.xilinx.com/en/articles/code-busting-fpga-blockchain-myths-part-3.html). It seems that one of the code libraries is outdated, therefore it is not possible to implement the solution. The python code from the tutorial is shown below. Does anyone knows another code to generate DAG file needed to solve this tutorial? 

 

PS: There is another discussion on this forum about this, however all the solutions presented did not work, at least for me.

 

import pyethash

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

# 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)

 

 

Best regards, Igor Lima. 

0 Kudos
Reply
0 Replies