Skip to content

Commit 47c531c

Browse files
committed
deps: add blst and upgrade crypto deps
1 parent d69524d commit 47c531c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

deps.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ fetch () {
135135
fi
136136
checkout_repo zstd https://github.com/facebook/zstd "v1.5.6"
137137
checkout_repo lz4 https://github.com/lz4/lz4 "v1.10.0"
138-
checkout_repo s2n https://github.com/awslabs/s2n-bignum "" "efa579c"
138+
checkout_repo s2n https://github.com/awslabs/s2n-bignum "" "4d2e22a"
139139
#checkout_repo openssl https://github.com/openssl/openssl "openssl-3.3.1"
140140
checkout_repo secp256k1 https://github.com/bitcoin-core/secp256k1 "v0.6.0"
141141
if [[ $DEVMODE == 1 ]]; then
142+
checkout_repo blst https://github.com/supranational/blst "v0.3.14"
142143
checkout_repo rocksdb https://github.com/facebook/rocksdb "v9.7.4"
143144
checkout_repo snappy https://github.com/google/snappy "1.2.1"
144145
fi
@@ -393,13 +394,24 @@ install_s2n () {
393394
echo "[+] Successfully installed s2n-bignum"
394395
}
395396

397+
install_blst () {
398+
cd "$PREFIX/git/blst"
399+
400+
echo "[+] Installing blst to $PREFIX"
401+
./build.sh
402+
cp libblst.a "$PREFIX/lib"
403+
cp bindings/*.h "$PREFIX/include"
404+
echo "[+] Successfully installed blst"
405+
}
406+
396407
install_secp256k1 () {
397408
cd "$PREFIX/git/secp256k1"
398409

399410
echo "[+] Configuring secp256k1"
400411
rm -rf build
401412
mkdir build
402413
cd build
414+
# https://github.com/bitcoin-core/secp256k1/blob/master/CMakeLists.txt#L59
403415
cmake .. \
404416
-G"Unix Makefiles" \
405417
-DCMAKE_INSTALL_PREFIX:PATH="$PREFIX" \
@@ -410,6 +422,7 @@ install_secp256k1 () {
410422
-DSECP256K1_BUILD_BENCHMARK=OFF \
411423
-DSECP256K1_DISABLE_SHARED=OFF \
412424
-DBUILD_SHARED_LIBS=OFF \
425+
-DSECP256K1_ENABLE_MODULE_ECDH=OFF \
413426
-DSECP256K1_ENABLE_MODULE_RECOVERY=ON \
414427
-DSECP256K1_ENABLE_MODULE_EXTRAKEYS=OFF \
415428
-DSECP256K1_ENABLE_MODULE_SCHNORRSIG=OFF \
@@ -578,6 +591,7 @@ install () {
578591
#( install_openssl )
579592
( install_secp256k1 )
580593
if [[ $DEVMODE == 1 ]]; then
594+
( install_blst )
581595
( install_snappy )
582596
( install_rocksdb )
583597
fi

0 commit comments

Comments
 (0)