Open axic opened 8 years ago
You mean https://github.com/ethereum/ethash or https://github.com/ethereumjs/ethashjs? :smiley:
https://github.com/cryptocoinjs/secp256k1-node was the basis for this project! Thanks for reminding me of stating this somewhere :+1:
Of course ethashjs :smiley:
@fanatid are you interested in picking this up? 😉
@axic not sure, but maybe in next or next-next year 😆
@axic I wasn't sure that there was still an interest to merge this. Since there is, I could try to pick this up.
How would this work? const Ethash = require('ethashjs')
for js implementation and const Ethash = require('ethashjs/cpp')
for bindings?
require('ethashjs/cpp')
for C++require('ethashjs/js')
for Javascriptrequire('ethashjs')
for auto detection@fanatid can show you some code how to do autodetection nicely.
@fanatid next year is here! 😉
There is a new C++ from scratch implementation of ethash which is going to be way better: https://github.com/chfast/ethash by @chfast
Also a further option would be to take a more phased approach, adding features in this order: 1) compile the new C++ code to wasm and asm.js and distribute that 2) if speed is not good enough, create the node.js binding 3) if educational value is preferred, create a pure JS implementation
Potentially this could be merged with https://github.com/ethereumjs/ethashjs once mature.
For a template on how two merge the two, see https://github.com/cryptocoinjs/secp256k1-node