eth-utils icon indicating copy to clipboard operation
eth-utils copied to clipboard

fix: update the return type to 'Hash32'

Open e3243eric opened this issue 3 years ago • 6 comments

What was wrong?

Issue #192

How was it fixed?

Update the return type from bytes to Hash32 for all methods that apply keccak. I explicitly cast the return type of eth_hash.auto.keccak to Hash32 in crypto.py, since its return type is bytes, maybe this should be fixed in eth_hash too.

To-Do

  • [x] Clean up commit history

Cute Animal Picture

put a cute animal picture link inside the parentheses

e3243eric avatar Sep 25 '22 16:09 e3243eric

Hi @carver, does this fix the issue? I need someone to do a code review. Thanks!

e3243eric avatar Sep 26 '22 14:09 e3243eric

I'm no longer an active maintainer on this project, paging @kclowes

carver avatar Sep 28 '22 00:09 carver

Note that I did not do a thorough search for all methods that should be updated, so part of the task is to identify all functions that should be updated.

carver avatar Sep 28 '22 00:09 carver

Also note that because some projects (especially some of ours) use type checking as part of CI, we typically treat type signature changes as breaking changes.

carver avatar Oct 21 '22 18:10 carver

It seems like the newsfragment doesn't have a breaking type. We should update the validate_files.py.

e3243eric avatar Oct 24 '22 00:10 e3243eric

Ah yeah, that implies that eth-utils is due for a merge from the latest template

carver avatar Oct 26 '22 18:10 carver