mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
d2d04864ef Merge bitcoin-core/secp256k1#1765: Add "silentpayments" module implementing BIP352 (take 4, limited to full-node scanning) 9e4ec507e9 Merge bitcoin-core/secp256k1#1890: nonce: terminate RFC6979 loop at UINT_MAX afff8cba00 Merge bitcoin-core/secp256k1#1894: extrakeys: check invariant that x-only pubkeys have even Y b1bc6f3e0c nonce: terminate RFC6979 loop at UINT_MAX 89a54b5aaf extrakeys: check invariant that x-only pubkeys have even Y cea6d11410 silentpayments: drop "shuffle outputs" recommendation from API docs 1ae90bde8b silentpayments: flush labels before direct match 84a02fa989 silentpayments: extract label batch checker 8c3e6e6d99 Merge bitcoin-core/secp256k1#1889: field: serialize elements by word 11dad6d06c Merge bitcoin-core/secp256k1#1887: Make theStack a maintainer and a security contact 4aa16704ce silentpayments: skip slow benchmarks for low iters count (<= 2) 7e4b313cd5 docs: update README f27a29687d ci: enable silentpayments module 4f7a578d4b tests: add sha256 tag test 936907b03f tests: add constant time tests b608a9d91b tests: add BIP-352 test vectors ca0136dcd5 silentpayments: optimize scanning by using batch inversion 7ae555c524 silentpayments: add benchmarks for scanning f0fdd99d31 silentpayments: add examples/silentpayments.c 1c1b2753f4 silentpayments: respect per-group recipients protocol limit (K_max=2323) d72a743273 silentpayments: receiving c83b6783b8 silentpayments: recipient label support b30ea3ebe4 silentpayments: sending a93e696a17 build: add skeleton for new silentpayments (BIP352) module e217ead5c4 field: serialize elements by word d5c64bafc7 SECURITY.md: Align the table 9bd50f0cef SECURITY.md: Add theStack's key ebf594320d Merge bitcoin-core/secp256k1#1884: SECURITY.md: remove Jonas Nick from trusted keys 21645c03a2 SECURITY.md: remove Jonas Nick from trusted keys b90075a074 Merge bitcoin-core/secp256k1#1882: scalar: correct `_scalar_get_bits_{limb32,var}` input condition docs 5a8a411425 Merge bitcoin-core/secp256k1#1877: field: correct `fe_equal` magnitude bound for `b` 6a599a4428 scalar: correct `_scalar_get_bits_{limb32,var}` input condition docs 994b35010d field: correct fe_equal's b magnitude bound 2ce4f71dc5 Merge bitcoin-core/secp256k1#1845: Improve checks for scalar _get_bits methods 68b45fd4e2 Merge bitcoin-core/secp256k1#1881: tests: Fix GCC 17 snapshot warning 9d75769dec tests: Fix GCC 17 snapshot warning 9e3a165ad0 Merge bitcoin-core/secp256k1#1879: ci: add 'brew trust' invocation to macOS CI 66260b78a2 ci: add 'brew trust' invocation to macOS CI 0cad3df503 Improve checks for scalar _get_bits methods git-subtree-dir: src/secp256k1 git-subtree-split: d2d04864ef9b056151603a3ced7980958b058028
149 lines
4.0 KiB
Bash
Executable File
149 lines
4.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
export LC_ALL=C
|
|
|
|
# Print commit and relevant CI environment to allow reproducing the job outside of CI.
|
|
git show --no-patch
|
|
print_environment() {
|
|
# Turn off -x because it messes up the output
|
|
set +x
|
|
# There are many ways to print variable names and their content. This one
|
|
# does not rely on bash.
|
|
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
|
|
ECMULTWINDOW ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
|
|
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS MUSIG SCHNORRSIG ELLSWIFT SILENTPAYMENTS \
|
|
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS SYMBOL_CHECK \
|
|
EXAMPLES \
|
|
HOST WRAPPER_CMD \
|
|
CC CFLAGS CPPFLAGS AR NM \
|
|
UBSAN_OPTIONS ASAN_OPTIONS LSAN_OPTIONS
|
|
do
|
|
eval "isset=\${$var+x}"
|
|
if [ -n "$isset" ]; then
|
|
eval "val=\${$var}"
|
|
# shellcheck disable=SC2154
|
|
printf '%s="%s" ' "$var" "$val"
|
|
fi
|
|
done
|
|
echo "$0"
|
|
set -x
|
|
}
|
|
print_environment
|
|
|
|
env >> test_env.log
|
|
|
|
# If gcc is requested, assert that it's in fact gcc (and not some symlinked Apple clang).
|
|
case "${CC:-undefined}" in
|
|
*gcc*)
|
|
$CC -v 2>&1 | grep -q "gcc version" || exit 1;
|
|
;;
|
|
esac
|
|
|
|
if [ -n "${CC+x}" ]; then
|
|
# The MSVC compiler "cl" doesn't understand "-v"
|
|
$CC -v || true
|
|
fi
|
|
if [ "$WITH_VALGRIND" = "yes" ]; then
|
|
valgrind --version
|
|
fi
|
|
if [ -n "$WRAPPER_CMD" ]; then
|
|
$WRAPPER_CMD --version
|
|
fi
|
|
|
|
./autogen.sh
|
|
|
|
./configure \
|
|
--enable-experimental="$EXPERIMENTAL" \
|
|
--with-test-override-wide-multiply="$WIDEMUL" --with-asm="$ASM" \
|
|
--with-ecmult-window="$ECMULTWINDOW" \
|
|
--with-ecmult-gen-kb="$ECMULTGENKB" \
|
|
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
|
|
--enable-module-ellswift="$ELLSWIFT" \
|
|
--enable-module-extrakeys="$EXTRAKEYS" \
|
|
--enable-module-schnorrsig="$SCHNORRSIG" \
|
|
--enable-module-musig="$MUSIG" \
|
|
--enable-module-silentpayments="$SILENTPAYMENTS" \
|
|
--enable-examples="$EXAMPLES" \
|
|
--enable-ctime-tests="$CTIMETESTS" \
|
|
--with-valgrind="$WITH_VALGRIND" \
|
|
--host="$HOST" $EXTRAFLAGS
|
|
|
|
# We have set "-j<n>" in MAKEFLAGS.
|
|
build_exit_code=0
|
|
make > make.log 2>&1 || build_exit_code=$?
|
|
cat make.log
|
|
if [ $build_exit_code -ne 0 ]; then
|
|
case "${CC:-undefined}" in
|
|
*snapshot*)
|
|
# Ignore internal compiler errors in gcc-snapshot and clang-snapshot
|
|
grep -e "internal compiler error:" -e "PLEASE submit a bug report" make.log
|
|
exit $?
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Print information about binaries so that we can see that the architecture is correct
|
|
file *tests* || true
|
|
file bench* || true
|
|
file .libs/* || true
|
|
|
|
if [ "$SYMBOL_CHECK" = "yes" ]
|
|
then
|
|
python3 --version
|
|
case "$HOST" in
|
|
*mingw*)
|
|
ls -l .libs
|
|
python3 ./tools/symbol-check.py .libs/libsecp256k1-*.dll
|
|
;;
|
|
*)
|
|
python3 ./tools/symbol-check.py .libs/libsecp256k1.so
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# This tells `make check` to wrap test invocations.
|
|
export LOG_COMPILER="$WRAPPER_CMD"
|
|
|
|
make "$BUILD"
|
|
|
|
# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
|
|
EXEC='./libtool --mode=execute'
|
|
if [ -n "$WRAPPER_CMD" ]
|
|
then
|
|
EXEC="$EXEC $WRAPPER_CMD"
|
|
fi
|
|
|
|
if [ "$BENCH" = "yes" ]
|
|
then
|
|
{
|
|
$EXEC ./bench_ecmult
|
|
$EXEC ./bench_internal
|
|
$EXEC ./bench
|
|
} >> bench.log 2>&1
|
|
fi
|
|
|
|
if [ "$CTIMETESTS" = "yes" ]
|
|
then
|
|
if [ "$WITH_VALGRIND" = "yes" ]; then
|
|
./libtool --mode=execute valgrind --error-exitcode=42 ./ctime_tests > ctime_tests.log 2>&1
|
|
else
|
|
$EXEC ./ctime_tests > ctime_tests.log 2>&1
|
|
fi
|
|
fi
|
|
|
|
# Rebuild precomputed files (if not cross-compiling).
|
|
if [ -z "$HOST" ]
|
|
then
|
|
make clean-precomp clean-testvectors
|
|
make precomp testvectors
|
|
fi
|
|
|
|
# Check that no repo files have been modified by the build.
|
|
# (This fails for example if the precomp files need to be updated in the repo.)
|
|
git diff --exit-code
|