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

Graphenelib 0.6.4 and 0.6.5 erroneously handling PrivateKey #68

Closed
bitphage opened this issue Aug 2, 2018 · 0 comments
Closed

Graphenelib 0.6.4 and 0.6.5 erroneously handling PrivateKey #68

bitphage opened this issue Aug 2, 2018 · 0 comments

Comments

@bitphage
Copy link
Contributor

bitphage commented Aug 2, 2018

#!/usr/bin/env python

#from bitsharesbase.account import PrivateKey
from graphenebase.account import PrivateKey

key = '6PRQdSDAjq41FVc58T1gykbihNPQeUCMWj8KW9uoeDKd1ZdZ6MbShYPhvS'

PrivateKey(key)
print('this should not happen')

Run testcase:

0.6.5:

this should not happen

0.6.3:

Traceback (most recent call last):
  File "./testcase2.py", line 8, in <module>
    PrivateKey(key)
  File "/home/vvk/.local/share/virtualenvs/DEXBot-XTl2tJdV/lib/python3.6/site-packages/graphenebase/account.py", line 322, in __init__
    self._pubkeyhex, self._pubkeyuncompressedhex = self.compressedpubkey()
  File "/home/vvk/.local/share/virtualenvs/DEXBot-XTl2tJdV/lib/python3.6/site-packages/graphenebase/account.py", line 331, in compressedpubkey
    order = ecdsa.SigningKey.from_string(secret, curve=ecdsa.SECP256k1).curve.generator.order()
  File "/home/vvk/.local/share/virtualenvs/DEXBot-XTl2tJdV/lib/python3.6/site-packages/ecdsa-0.13-py3.6.egg/ecdsa/keys.py", line 149, in from_string
    assert len(string) == curve.baselen, (len(string), curve.baselen)
AssertionError: (38, 32)
xeroc added a commit that referenced this issue Aug 3, 2018
xeroc added a commit that referenced this issue Aug 3, 2018
@xeroc xeroc closed this as completed Aug 3, 2018
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

2 participants