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

Create and test coincurve ecc backend #31

Merged
merged 1 commit into from
Jul 22, 2017

Conversation

DavidKnott
Copy link
Contributor

This PR is in response to #25
@pipermerriam Right now I have coincurve as an extra requirement like you suggested. I'm also testing coincurve by comparing it with the pure python implementation.

Cute Animal Picture

image

@@ -0,0 +1,77 @@
from .base import BaseECCBackend

from coincurve.keys import (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would request that all coincurve imports be positioned within the CoinCurveECCBackend class itself so that this module can be properly imported even if coincurve isn't available. Then, within the __init__ method of the CoinCurveECCBackend class, do something like the following to produce a nice friendly import error if the library isn't available.

def __init__(....):
    try:
        import coincurve
    except ImportError:
        raise ImportError("The CoinCurveECCBackend requires the coincurve library which is not available for import.")
    ...

@DavidKnott DavidKnott force-pushed the pluggable-ecc-backends branch from 7f24c19 to e3e0569 Compare July 21, 2017 05:12
setup.py Outdated
@@ -32,6 +32,9 @@
"ethereum-bloom>=0.4.0",
"pyethash>=0.1.27",
],
extra_require=[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

extra_require={
    'coincurve': [
        "coincurve>=4.5.1",
    ],
}

@DavidKnott DavidKnott force-pushed the pluggable-ecc-backends branch from e3e0569 to 221211f Compare July 21, 2017 22:10
@pipermerriam pipermerriam merged commit 65afb30 into ethereum:master Jul 22, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants