ludbb / secp256k1-py

Python FFI bindings for secp256k1 :dizzy:
MIT License
107 stars 53 forks source link

Exception: secp256k1_schnorr not enabled #25

Open pereferrera opened 6 years ago

pereferrera commented 6 years ago

Hi there, I can't find much information on how to compile libsecp256k1 for Schnorr support, I simply tried to clone the latest version of the lib and compile it and still got the same error. Any ideas?

darrenhdc commented 4 years ago

+1

kpxx commented 3 years ago

Hi there, I can't find much information on how to compile libsecp256k1 for Schnorr support, I simply tried to clone the latest version of the lib and compile it and still got the same error. Any ideas?

$git clone https://github.com/bitcoin-core/secp256k1.git
$cd secp256k1
$git log --stat  e06e878fd7dcc99825025fa99aedb86bc7d5c29f

following commit causes **secp256k1_schnorr not enabled**


commit e06e878fd7dcc99825025fa99aedb86bc7d5c29f Author: Pieter Wuille pieter.wuille@gmail.com Date: Thu Nov 17 17:49:11 2016 -0800

Remove Schnorr experiment


Let's checkout older one, then build:

$git checkout 04c8ef36ad35e846ac27157021a78f79465f2a22
#reinstall libsecp256k1
#NOTE: default prefix[/usr/local/]
$./configure --enable-experimental --enable-endomorphism --enable-module-schnorr --enable-module-recovery 
$make
$sudo make install

#reinstall secp256k1
$pip uninstall secp256k1 cffi
$env SECP_BUNDLED_EXPERIMENTAL=1 INCLUDE_DIR=/usr/local/include LIB_DIR=/usr/local/lib pip install --no-binary :all:  secp256k1 --no-cache-dir

here you are. gook luck and have fun.