-
Notifications
You must be signed in to change notification settings - Fork 20.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ethash frontier update #757
Comments
I will help as much as I can, but golang is not my specialty. I am currently working on making the GO bridge use the new API. I will open a Pull Request and request feedback tomorrow probably. |
The new bridge is almost done, see ethereum/ethash#41 for progress. |
Integration PR: #808 |
Update: After debugging a bunch of bugs with @LefterisJP we now have a version where DAG creation works through Go bridge and mining works both on private chain and on testnet. Will verify it for block tests as well (their startup needs some updates to work with current develop branch) One issue we found is that this call: https://github.com/LefterisJP/ethash/blob/finalize_and_use_new_api/ethash.go#L79 causes the Go garbage collector to run https://github.com/LefterisJP/ethash/blob/finalize_and_use_new_api/ethash.go#L67 before the C function is done with building the DAG. This results in the C code running into segfault when trying to reference the cache in https://github.com/LefterisJP/ethash/blob/finalize_and_use_new_api/src/libethash/internal.c#L93 Commenting out the finalizer call avoids deallocating the cache before DAG building is done. We should find out why the Go runtime / GC considers this cache to be unreachable before this call returns: https://github.com/LefterisJP/ethash/blob/finalize_and_use_new_api/ethash.go#L169 |
Edit: moving the finalizer until after the call also works and should have same intended behavior. |
Another update: @fjl suggested a better way to clear the cache by moving the finalizer call to getCache and explicitly free the temp cache in makeDAG |
All that's left to do is add miner control over the CPU's being used. It will require some significant re-write on the miner's part since it initialises the amount of agents on init. |
now only 1 issue left, support miniDAG for testing. but this is not a frontier show stopper |
|
i know we can, we just dont yet :) but on second thought that shouldnt be an ethash issue any more. closing this ftw |
This issue collected all ethash related issues. @LefterisJP
we need to make sure all these tick off before frontier.
The text was updated successfully, but these errors were encountered: