py-evm
py-evm copied to clipboard
Use ConsensusContextAPI to get rid of global cache currently used in PoW implementation.
What is wrong?
Currently, our proof of work implementation uses a single shared global cache. With the upcoming refactoring of the consensus mechanism (currently brewing in #1899), there's an explicit mechanism of a ConsensusContextAPI that can be used to provide state to the consensus engine that should remain static across the lifetime of a chain (or potentially across the lifetime of a chain segment under a specific fork)
How can it be fixed
After #1899 landed, refactor PoW handling to use that mechanism.