mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
afb7a6fe06
8746600eec Merge bitcoin-core/secp256k1#1093: hash: Make code agnostic of endianness 37d36927df tests: Add tests for _read_be32 and _write_be32 912b7ccc44 Merge bitcoin-core/secp256k1#1094: doc: Clarify configure flags for optional modules 55512d30b7 doc: clean up module help text in configure.ac d9d94a9969 doc: mention optional modules in README 616b43dd3b util: Remove endianness detection 8d89b9e6e5 hash: Make code agnostic of endianness d0ad5814a5 Merge bitcoin-core/secp256k1#995: build: stop treating schnorrsig, extrakeys modules as experimental 1ac7e31c5b Merge bitcoin-core/secp256k1#1089: Schnorrsig API improvements 587239dbe3 Merge bitcoin-core/secp256k1#731: Change SHA256 byte counter from size_t to uint64_t f8d9174357 Add SHA256 bit counter tests 7f09d0f311 README: mention that ARM assembly is experimental b8f8b99f0f docs: Fix return value for functions that don't have invalid inputs f813bb0df3 schnorrsig: Adapt example to new API 99e6568fc6 schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate fc94a2da44 Use SECP256K1_DEPRECATED for existing deprecated API functions 3db0560606 Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated 80cf4eea5f build: stop treating schnorrsig, extrakeys modules as experimental e0508ee9db Merge bitcoin-core/secp256k1#1090: configure: Remove redundant pkg-config code 21b2ebaf74 configure: Remove redundant pkg-config code 0e5cbd01b3 Merge bitcoin-core/secp256k1#1088: configure: Use modern way to set AR 0d253d52e8 configure: Use modern way to set AR 9b514ce1d2 Add test vector for very long SHA256 messages 8e3dde1137 Simplify struct initializer for SHA256 padding eb28464a8b Change SHA256 byte counter from size_t to uint64_t ac83be33d0 Merge bitcoin-core/secp256k1#1079: configure: Add hidden --enable-dev-mode to enable all the stuff e0838d663d configure: Add hidden --enable-dev-mode to enable all the stuff fabd579dfa configure: Remove redundant code that sets _enable variables 0d4226c051 configure: Use canonical variable prefix _enable consistently 64b34979ed Merge bitcoin-core/secp256k1#748: Add usage examples 7c9502cece Add a copy of the CC0 license to the examples 42e03432e6 Add usage examples to the readme 517644eab1 Optionally compile the examples in autotools, compile+run in travis 422a7cc86a Add a ecdh shared secret example b0cfbcc143 Add a Schnorr signing and verifying example fee7d4bf9e Add an ECDSA signing and verifying example 1253a27756 Merge bitcoin-core/secp256k1#1033: Add _fe_half and use in _gej_add_ge and _gej_double 3ef94aa5ba Merge bitcoin-core/secp256k1#1026: ecdh: Add test computing shared_secret=basepoint with random inputs 3531a43b5b ecdh: Make generator_basepoint test depend on global iteration count c881dd49bd ecdh: Add test computing shared_secret=basepoint with random inputs 077528317d Merge bitcoin-core/secp256k1#1074: ci: Retry brew update a few times to avoid random failures e51ad3b737 ci: Retry `brew update` a few times to avoid random failures b1cb969e8a ci: Revert "Attempt to make macOS builds more reliable" 5dcc6f8dbd Merge bitcoin-core/secp256k1#1069: build: Replace use of deprecated autoconf macro AC_PROG_CC_C89 59547943d6 Merge bitcoin-core/secp256k1#1072: ci: Attempt to make macOS builds more reliable 85b00a1c65 Merge bitcoin-core/secp256k1#1068: sage: Fix incompatibility with sage 9.4 ebb1beea78 sage: Ensure that constraints are always fastfracs d8d54859ed ci: Run sage prover on CI 77cfa98dbc sage: Normalize sign of polynomial factors in prover eae75869cf sage: Exit with non-zero status in case of failures d9396a56da ci: Attempt to make macOS builds more reliable e0db3f8a25 build: Replace use of deprecated autoconf macro AC_PROG_CC_C89 e848c3799c Update sage files for new formulae d64bb5d4f3 Add fe_half tests for worst-case inputs b54d843eac sage: Fix printing of errors 4eb8b932ff Further improve doubling formula using fe_half 557b31fac3 Doubling formula using fe_half 2cbb4b1a42 Run more iterations of run_field_misc 9cc5c257ed Add test for secp256k1_fe_half 925f78d55e Add _fe_half and use in _gej_add_ge e108d0039c sage: Fix incompatibility with sage 9.4 d8a2463246 Merge bitcoin-core/secp256k1#899: Reduce stratch space needed by ecmult_strauss_wnaf. 0a40a4861a Merge bitcoin-core/secp256k1#1049: Faster fixed-input ecmult tests 070e772211 Faster fixed-input ecmult tests c8aa516b57 Merge bitcoin-core/secp256k1#1064: Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063 b797a500ec Create a SECP256K1_ECMULT_TABLE_VERIFY macro. a731200cc3 Replace ECMULT_TABLE_GET_GE_STORAGE macro with a function. fe34d9f341 Eliminate input_pos state field from ecmult_strauss_wnaf. 0397d00ba0 Eliminate na_1 and na_lam state fields from ecmult_strauss_wnaf. 7ba3ffcca0 Remove the unused pre_a_lam allocations. b3b57ad6ee Eliminate the pre_a_lam array from ecmult_strauss_wnaf. ae7ba0f922 Remove the unused prej allocations. e5c18892db Eliminate the prej array from ecmult_strauss_wnaf. c9da1baad1 Move secp256k1_fe_one to field.h 45f37b6506 Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063. a1102b1219 Merge bitcoin-core/secp256k1#1029: Simpler and faster ecdh skew fixup e82144edfb Fixup skew before global Z fixup 40b624c90b Add tests for _gej_cmov 8c13a9bfe1 ECDH skews by 0 or 1 1515099433 Simpler and faster ecdh skew fixup 39a36db94a Merge bitcoin-core/secp256k1#1054: tests: Fix test whose result is implementation-defined a310e79ee5 Merge bitcoin-core/secp256k1#1052: Use xoshiro256++ instead of RFC6979 for tests 423b6d19d3 Merge bitcoin-core/secp256k1#964: Add release-process.md 9281c9f4e1 Merge bitcoin-core/secp256k1#1053: ecmult: move `_ecmult_odd_multiples_table_globalz_windowa` 77a19750b4 Use xoshiro256++ PRNG instead of RFC6979 in tests 5f2efe684e secp256k1_testrand_int(2**N) -> secp256k1_testrand_bits(N) 05e049b73c ecmult: move `_ecmult_odd_multiples_table_globalz_windowa` 3d7cbafb5f tests: Fix test whose result is implementation-defined 3ed0d02bf7 doc: add CHANGELOG template 6f42dc16c8 doc: add release_process.md 0bd3e4243c build: set library version to 0.0.0 explicitly b4b02fd8c4 build: change libsecp version from 0.1 to 0.1.0-pre 09971a3ffd Merge bitcoin-core/secp256k1#1047: ci: Various improvements 0b83b203e1 Merge bitcoin-core/secp256k1#1030: doc: Fix upper bounds + cleanup in field_5x52_impl.h comment 1287786c7a doc: Add comment to top of field_10x26_impl.h 58da5bd589 doc: Fix upper bounds + cleanup in field_5x52_impl.h comment b39d431aed Merge bitcoin-core/secp256k1#1044: Add another ecmult_multi test b4ac1a1d5f ci: Run valgrind/memcheck tasks with 2 CPUs e70acab601 ci: Use Cirrus "greedy" flag to use idle CPU time when available d07e30176e ci: Update brew on macOS 22382f0ea0 ci: Test different ecmult window sizes a69df3ad24 Merge bitcoin-core/secp256k1#816: Improve checks at top of _fe_negate methods 22d25c8e0a Add another ecmult_multi test 515e7953ca Improve checks at top of _fe_negate methods 26a022a3a0 ci: Remove STATICPRECOMPUTATION 10461d8bd3 precompute_ecmult: Always compute all tables up to default WINDOW_G be6944ade9 Merge bitcoin-core/secp256k1#1042: Follow-ups to making all tables fully static e05da9e480 Fix c++ build c45386d994 Cleanup preprocessor indentation in precompute{,d}_ecmult{,_gen} 19d96e15f9 Split off .c file from precomputed_ecmult.h 1a6691adae Split off .c file from precomputed_ecmult_gen.h bb36331412 Simplify precompute_ecmult_print_* 38cd84a0cb Compute ecmult tables at runtime for tests_exhaustive e458ec26d6 Move ecmult table computation code to separate file fc1bf9f15f Split ecmult table computation and printing 31feab053b Rename function secp256k1_ecmult_gen_{create_prec -> compute}_table 725370c3f2 Rename ecmult_gen_prec -> ecmult_gen_compute_table 075252c1b7 Rename ecmult_static_pre_g -> precomputed_ecmult 7cf47f72bc Rename ecmult_gen_static_prec_table -> precomputed_ecmult_gen f95b8106d0 Rename gen_ecmult_static_pre_g -> precompute_ecmult bae77685eb Rename gen_ecmult_gen_static_prec_table -> precompute_ecmult_gen git-subtree-dir: src/secp256k1 git-subtree-split: 8746600eec5e7fcd35dabd480839a3a4bdfee87b
326 lines
8.7 KiB
YAML
326 lines
8.7 KiB
YAML
env:
|
|
### compiler options
|
|
HOST:
|
|
# Specific warnings can be disabled with -Wno-error=foo.
|
|
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
|
|
WERROR_CFLAGS: -Werror -pedantic-errors
|
|
MAKEFLAGS: -j4
|
|
BUILD: check
|
|
### secp256k1 config
|
|
ECMULTWINDOW: auto
|
|
ECMULTGENPRECISION: auto
|
|
ASM: no
|
|
WIDEMUL: auto
|
|
WITH_VALGRIND: yes
|
|
EXTRAFLAGS:
|
|
### secp256k1 modules
|
|
EXPERIMENTAL: no
|
|
ECDH: no
|
|
RECOVERY: no
|
|
SCHNORRSIG: no
|
|
### test options
|
|
SECP256K1_TEST_ITERS:
|
|
BENCH: yes
|
|
SECP256K1_BENCH_ITERS: 2
|
|
CTIMETEST: yes
|
|
# Compile and run the tests
|
|
EXAMPLES: yes
|
|
|
|
cat_logs_snippet: &CAT_LOGS
|
|
always:
|
|
cat_tests_log_script:
|
|
- cat tests.log || true
|
|
cat_exhaustive_tests_log_script:
|
|
- cat exhaustive_tests.log || true
|
|
cat_valgrind_ctime_test_log_script:
|
|
- cat valgrind_ctime_test.log || true
|
|
cat_bench_log_script:
|
|
- cat bench.log || true
|
|
on_failure:
|
|
cat_config_log_script:
|
|
- cat config.log || true
|
|
cat_test_env_script:
|
|
- cat test_env.log || true
|
|
cat_ci_env_script:
|
|
- env
|
|
|
|
merge_base_script_snippet: &MERGE_BASE
|
|
merge_base_script:
|
|
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
|
|
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
|
|
- git config --global user.email "ci@ci.ci"
|
|
- git config --global user.name "ci"
|
|
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
|
|
|
|
linux_container_snippet: &LINUX_CONTAINER
|
|
container:
|
|
dockerfile: ci/linux-debian.Dockerfile
|
|
# Reduce number of CPUs to be able to do more builds in parallel.
|
|
cpu: 1
|
|
# Gives us more CPUs for free if they're available.
|
|
greedy: true
|
|
# More than enough for our scripts.
|
|
memory: 1G
|
|
|
|
task:
|
|
name: "x86_64: Linux (Debian stable)"
|
|
<< : *LINUX_CONTAINER
|
|
matrix: &ENV_MATRIX
|
|
- env: {WIDEMUL: int64, RECOVERY: yes}
|
|
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes}
|
|
- env: {WIDEMUL: int128}
|
|
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes}
|
|
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes}
|
|
- env: {WIDEMUL: int128, ASM: x86_64}
|
|
- env: { RECOVERY: yes, SCHNORRSIG: yes}
|
|
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
|
|
- env: {CPPFLAGS: -DDETERMINISTIC}
|
|
- env: {CFLAGS: -O0, CTIMETEST: no}
|
|
- env: { ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
|
|
- env: { ECMULTGENPRECISION: 8, ECMULTWINDOW: 4 }
|
|
matrix:
|
|
- env:
|
|
CC: gcc
|
|
- env:
|
|
CC: clang
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "i686: Linux (Debian stable)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
HOST: i686-linux-gnu
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
matrix:
|
|
- env:
|
|
CC: i686-linux-gnu-gcc
|
|
- env:
|
|
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "x86_64: macOS Catalina"
|
|
macos_instance:
|
|
image: catalina-base
|
|
env:
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
# Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment...
|
|
MAKEFLAGS: -j13
|
|
matrix:
|
|
<< : *ENV_MATRIX
|
|
matrix:
|
|
- env:
|
|
CC: gcc-9
|
|
- env:
|
|
CC: clang
|
|
# Update Command Line Tools
|
|
# Uncomment this if the Command Line Tools on the CirrusCI macOS image are too old to brew valgrind.
|
|
# See https://apple.stackexchange.com/a/195963 for the implementation.
|
|
## update_clt_script:
|
|
## - system_profiler SPSoftwareDataType
|
|
## - touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
|
## - |-
|
|
## PROD=$(softwareupdate -l | grep "*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | sed 's/Label: //g' | tr -d '\n')
|
|
## # For debugging
|
|
## - softwareupdate -l && echo "PROD: $PROD"
|
|
## - softwareupdate -i "$PROD" --verbose
|
|
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
|
##
|
|
brew_valgrind_pre_script:
|
|
# Retry a few times because this tends to fail randomly.
|
|
- for i in {1..5}; do brew update && break || sleep 15; done
|
|
- brew config
|
|
- brew tap LouisBrunner/valgrind
|
|
# Fetch valgrind source but don't build it yet.
|
|
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
|
|
brew_valgrind_cache:
|
|
# This is $(brew --cellar valgrind) but command substition does not work here.
|
|
folder: /usr/local/Cellar/valgrind
|
|
# Rebuild cache if ...
|
|
fingerprint_script:
|
|
# ... macOS version changes:
|
|
- sw_vers
|
|
# ... brew changes:
|
|
- brew config
|
|
# ... valgrind changes:
|
|
- git -C "$(brew --cache)/valgrind--git" rev-parse HEAD
|
|
populate_script:
|
|
# If there's no hit in the cache, build and install valgrind.
|
|
- brew install --HEAD LouisBrunner/valgrind/valgrind
|
|
brew_valgrind_post_script:
|
|
# If we have restored valgrind from the cache, tell brew to create symlink to the PATH.
|
|
# If we haven't restored from cached (and just run brew install), this is a no-op.
|
|
- brew link valgrind
|
|
brew_script:
|
|
- brew install automake libtool gcc@9
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-s390x
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: s390x-linux-gnu
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=27008
|
|
- rm /etc/ld.so.cache
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "ARM32: Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-arm
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: arm-linux-gnueabihf
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
matrix:
|
|
- env: {}
|
|
- env: {EXPERIMENTAL: yes, ASM: arm}
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "ARM64: Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-aarch64
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: aarch64-linux-gnu
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "ppc64le: Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-ppc64le
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: powerpc64le-linux-gnu
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: wine64-stable
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: x86_64-w64-mingw32
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
# Sanitizers
|
|
task:
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
matrix:
|
|
- name: "Valgrind (memcheck)"
|
|
container:
|
|
cpu: 2
|
|
env:
|
|
# The `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (https://www.valgrind.org/docs/manual/manual-core.html)
|
|
WRAPPER_CMD: "valgrind --error-exitcode=42"
|
|
SECP256K1_TEST_ITERS: 2
|
|
- name: "UBSan, ASan, LSan"
|
|
container:
|
|
memory: 2G
|
|
env:
|
|
CFLAGS: "-fsanitize=undefined,address -g"
|
|
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
|
|
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
|
|
LSAN_OPTIONS: "use_unaligned=1"
|
|
SECP256K1_TEST_ITERS: 32
|
|
# Try to cover many configurations with just a tiny matrix.
|
|
matrix:
|
|
- env:
|
|
ASM: auto
|
|
- env:
|
|
ASM: no
|
|
ECMULTGENPRECISION: 2
|
|
ECMULTWINDOW: 2
|
|
matrix:
|
|
- env:
|
|
CC: clang
|
|
- env:
|
|
HOST: i686-linux-gnu
|
|
CC: i686-linux-gnu-gcc
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "C++ -fpermissive"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
# ./configure correctly errors out when given CC=g++.
|
|
# We hack around this by passing CC=g++ only to make.
|
|
CC: gcc
|
|
MAKEFLAGS: -j4 CC=g++ CFLAGS=-fpermissive\ -g
|
|
WERROR_CFLAGS:
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "sage prover"
|
|
<< : *LINUX_CONTAINER
|
|
test_script:
|
|
- cd sage
|
|
- sage prove_group_implementations.sage
|