Remove dependence on ethash
(pyethash)
#2121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
The move toward prioritization of the execution layer & EVM logic.
The goal for
py-evm
was once to provide the Trinity client with an EVM accessible via Python. This is not the case anymore as Trinity was sunset. With different consensus configurations, py-evm still serves well today for EVM logic testing. With the move to PoS (Proof of Stake) after the merge, there is a drive to remove the dependency on theethash
library. There are a few implementations of the Ethash algorithm in python and the goal of internalizing this logic into python-only code if desired is accessible without too much dev time being taken up. Using ethereum.org and the execution-specs as references, implement an in-house ethash algorithm that works well enough, even if it is significantly slower.Added motivation: Python 3.10+ support in
ethash
leads to unknown segfaults. Maintaining the C bindings file inethash
for little benefit becomes an added chore to debug, find someone to review + approve, and update. That repository does not seem to be very actively maintained anymore and larger projects like go-ethereum have already dropped mining andethash
dependence altogether. Internalizing the ethash algorithm gives ease of control for supporting new python versions.How was it fixed?
Todo:
Cute Animal Picture