From 65cedf536fc15b2dfc8830e1e7621089c6422ad0 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 20 Oct 2021 10:40:40 +0200 Subject: [PATCH] Switch to vanilla libsecp256k1 Libwally includes libsecp256k1-zkp as a submodule, because it has support for cryptographic functions used in Elements. This commit checks out an earlier commit that matches the libsecp256k1 used by Bitcoin Core. This is possible because libsecp256k1-zkp is regularly rebased on top of libsecp256k1. --- build-libwally.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build-libwally.sh b/build-libwally.sh index ae37bce4..f3ce0c2d 100755 --- a/build-libwally.sh +++ b/build-libwally.sh @@ -35,6 +35,15 @@ fi cd CLibWally/libwally-core +# Switch to vanilla libsecp256k1, rather than the more experimental libsecp256k1-zkp. +# Since libsecp256k1-zkp is rebased on vanilla libsecp256k1, we can simply checkout +# a common commit. +pushd src/secp256k1 + # Latest commit used in Bitcoin Core: + # https://github.com/bitcoin/bitcoin/commits/master/src/secp256k1 + git checkout be8d9c262f46309d9b4165b0498b71d704aba8fe || exit 1 +popd + if [ $clean == 1 ]; then rm -rf build fi @@ -53,7 +62,7 @@ if [ $simulator == 1 ]; then export CFLAGS="-O3 -arch x86_64 -arch i386 -fembed-bitcode-marker -mios-simulator-version-min=10.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`" export CXXFLAGS="-O3 -arch x86_64 -arch i386 -fembed-bitcode-marker -mios-simulator-version-min=10.0 -isysroot `xcrun -sdk iphonesimulator --show-sdk-path`" mkdir -p build - ./configure --disable-shared --host=x86_64-apple-darwin --enable-static --disable-elements + ./configure --disable-shared --host=x86_64-apple-darwin --enable-static --disable-elements --enable-standard-secp if [ $clean == 1 ]; then set -v # display commands make clean @@ -73,7 +82,7 @@ if [ $device == 1 ]; then export CFLAGS="-O3 -arch arm64 -arch arm64e -arch armv7 -arch armv7s -fembed-bitcode -mios-version-min=10.0 -isysroot `xcrun -sdk iphoneos --show-sdk-path`" export CXXFLAGS="-O3 -arch arm64 -arch arm64e -arch armv7 -arch armv7s -isysroot -fembed-bitcode -mios-version-min=10.0 -isysroot `xcrun -sdk iphoneos --show-sdk-path`" mkdir -p build - ./configure --disable-shared --host=aarch64-apple-darwin14 --enable-static --disable-elements + ./configure --disable-shared --host=aarch64-apple-darwin14 --enable-static --disable-elements --enable-standard-secp if [ $clean == 1 ]; then make clean fi