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

S256Point Class Doesn't Store Whether or Not It's Compressed/Testnet #64

Open
mflaxman opened this issue Jun 4, 2021 · 0 comments
Open

Comments

@mflaxman
Copy link
Collaborator

mflaxman commented Jun 4, 2021

This is simplest and makes sense for 99% of use-cases, but it does have a strange side-effect:

>>> from buidl.ecc import PrivateKey
>>> PrivateKey(secret=1, compressed=False).point.address()
'1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH'
>>> PrivateKey(secret=1, compressed=False).point.address(compressed=False)
'1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm'

also

>>> PrivateKey(secret=1, testnet=True).point.address()
'1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH'
>>> PrivateKey(secret=1, testnet=True).point.address(testnet=True)
'mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r'

Likely a no-fix since uncompressed keys have been deprecated for many years (and testnet is also default opted out out and not the main use-case), but wanted to at least document the unexpected behavior.

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

1 participant