Skip to content
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

Wrong sha3 ? #2

Open
TallJanSmit opened this issue May 30, 2017 · 2 comments
Open

Wrong sha3 ? #2

TallJanSmit opened this issue May 30, 2017 · 2 comments

Comments

@TallJanSmit
Copy link

I am guessing it is due to usage of pysha3-1.0.2 rather than pysha3==0.3 (as I read in requirements.txt), but to get namehash to work properly I changed line 4 as follows:

from sha3 import keccak_256 as sha3_256

Not sure why sha3_256 and keccak_256 differ though

@marcosmartinez7
Copy link

@TallJanSmit you are a hero without a cape.

The requirements are

pyhsa >= 0.3 < 1.0.0

I think that from python 3.6 the pysha3 versions are greater than 1.0.0, so, for example, i tried the examples of the Readme and found this:

  File "test.py", line 1, in <module>
    from namehash import namehash
  File "/home/marcos/sandbox/venv/lib/python3.6/site-packages/namehash.py", line 24, in <module>
    assert codecs.encode(sha3(b''), 'hex') == b'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'  # noqa
AssertionError

I guess there was a breaking modification on the codecs package or sha3 implementation

@andrewshvv
Copy link

andrewshvv commented Nov 13, 2021

Is there any way to remove this assertion and make it work properly out of the box? Have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants