ethereum / eth-hash

The Ethereum hashing function, keccak256, sometimes (erroneously) called sha256 or sha3
MIT License
104 stars 64 forks source link

Keccak256 no longer picklable #18

Closed gsalgado closed 6 years ago

gsalgado commented 6 years ago

https://github.com/ethereum/eth-hash/commit/99d647e9832f12672c52556dbb21b4c38a75c35d makes Keccak256 keep a reference to the backend module (e.g. eth_hash.backends.pycryptodome) whereas before it'd keep references to the backend's functions (keccak256 and preimage). That is a problem because it means Keccak256 is no longer picklable, which means we can't use it with, say, a concurrent.futures.ProcessPoolExecutor