-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update for SECP256K1 v0.4.1 #131
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #131 +/- ##
=======================================
Coverage 85.45% 85.45%
=======================================
Files 10 10
Lines 557 557
Branches 57 57
=======================================
Hits 476 476
Misses 45 45
Partials 36 36
|
Looks like some style errors |
@ofek, @carterbox I seem to have finally got it going, though it might not be very elegant. It just passed with a patched coincurve, so I added the solution this PR. I will update the conda recipe to see if with the coincurve PR it will build (without patching) |
@ofek, I did use PY_LIMITED_API for the @carterbox , right, thanks, I had stumbled upon this info in the pst. The issue here is that a specific syntax has to be used with CFFI for it to compile the object for linkage to a shared library, by default it assumes the library would be static (or at least that's what i experienced I just checked and all runs have passed, we should be close to LGTM after review and needed corrections Thanks for all the help, it was a long journey |
Is there a way to avoid that? I would much prefer API after reading https://cffi.readthedocs.io/en/stable/overview.html#abi-versus-api |
@ofek, this is what I was referring to with So actually, it seem to generate a CPython dependent library: Whereas for libsecp256k1-py-bindings I am not understanding why, though |
So am I correct in understanding that actually the mode hasn't changed with this PR? |
@ofek, Well, you are correct. I realized I used |
Is pkgconfig required? I've hardly ever seen that used |
@ofek, I use it to find whether libsecp256k1 is installed. The issue seems to be that setup.py does not know it is needed since I put the info in the pyproject.toml |
@ofek Oops, I changed the name of my branch, I did not foresee that it would close this PR ... maybe make a new PR? |
Yeah go ahead and open another! |
Mainly add support for the new features of SECP256K1.
The .h are created automatically from the sec256pk1 with gcc -E (and a few tricks) so it formats a little oddly, creating lots of changes (like int* a -> int *a) which may make the review tedious
In the conda recipe (and the github repo for libsecp256k1-py-bindings), the
build.py
was modified to make it more automated and able to add either dynamic or static Clib. The compilation also uses an ABI version of CFFI lib