Skip to content

Commit a4b4239

Browse files
achow101janus
authored andcommitted
Squashed 'src/secp256k1/' changes from 2f2ccc46954..0cdc758a563
0cdc758a563 Merge bitcoin-core/secp256k1#1631: release: prepare for 0.6.0 39d5dfd542a release: prepare for 0.6.0 df2eceb2790 build: add ellswift.md and musig.md to release tarball a306bb7e903 tools: fix check-abi.sh after cmake out locations were changed 145868a84d2 Do not export `secp256k1_musig_nonce_gen_internal` b161bffb8bf Merge bitcoin-core/secp256k1#1579: Clear sensitive memory without getting optimized out (revival of #636) a38d879a1a6 Merge bitcoin-core/secp256k1#1628: Name public API structs 7d48f5ed02e Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16 694342fdb71 Name public API structs 0f73caf7c62 test, ci: Lower default iteration count to 16 9a8db52f4e9 Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names 765ef53335a Clear _gej instances after point multiplication to avoid potential leaks 349e6ab916b Introduce separate _clear functions for hash module 99cc9fd6d01 Don't rely on memset to set signed integers to 0 97c57f42ba8 Implement various _clear() functions with secp256k1_memclear() 9bb368d1466 Use secp256k1_memclear() to clear stack memory instead of memset() e3497bbf001 Separate between clearing memory and setting to zero in tests d79a6ccd43a Separate secp256k1_fe_set_int( . , 0 ) from secp256k1_fe_clear() 1c081262227 Add secp256k1_memclear() for clearing secret data 1464f15c812 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros 980c08df80a util: Remove unused (u)int64_t formatting macros 9b7c59cbb90 Merge bitcoin-core/secp256k1#1624: ci: Update macOS image 096e3e23f63 ci: Update macOS image e7d384488e8 Don't clear secrets in pippenger implementation 68b55209f1b Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points f0868a9b3d8 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows 1fae76f50c0 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API 8be3839fb2e Remove unused scratch space from API 57eda3ba300 musig: ctimetests: fix _declassify range for generated nonce points 87384f5c0f2 cmake, test: Add `secp256k1_` prefix to test names e59158b6eb7 Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations 18f9b967c25 Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig 5bab8f6d3c4 examples: make key generation doc consistent e8908221a45 examples: do not retry generating seckey randomness in musig 70b6be1834e extrakeys: improve doc of keypair_create (don't suggest retry) 01b5893389e Merge bitcoin-core/secp256k1#1599: #1570 improve examples: remove key generation loop cd4f84f3ba8 Improve examples/documentation: remove key generation loops a88aa935063 Merge bitcoin-core/secp256k1#1603: f can never equal -m 3660fe5e2a9 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327) 168c92011f5 build: allow enabling the musig module in cmake f411841a46b Add module "musig" that implements MuSig2 multi-signatures (BIP 327) 0be79660f38 util: add constant-time is_zero_array function c8fbdb1b972 group: add ge_to_bytes_ext and ge_from_bytes_ext ef7ff03407f f can never equal -m c232486d84e Revert "cmake: Set `ENVIRONMENT` property for examples on Windows" 26e4a7c2146 cmake: Set top-level target output locations 4c57c7a5a95 Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code 447334cb06d include: Avoid visibility("default") on Windows 472faaa8ee6 Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description 292310fbb24 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description 85e224dd97f group: add ge_to_bytes and ge_from_bytes 7c987ec89e6 cmake: Call `enable_testing()` unconditionally 6aa576515ef cmake: Delete `CTest` module git-subtree-dir: src/secp256k1 git-subtree-split: 0cdc758a56360bf58a851fe91085a327ec97685a
1 parent 8041716 commit a4b4239

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4742
-532
lines changed

.cirrus.yml

+58-119
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,62 @@
11
env:
22
### cirrus config
33
CIRRUS_CLONE_DEPTH: 1
4-
CIRRUS_LOG_TIMESTAMP: true
5-
MAKEJOBS: "-j10"
6-
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
7-
CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling processes and setting this variable avoids killing the CI script itself on error
8-
9-
# A self-hosted machine(s) can be used via Cirrus CI. It can be configured with
10-
# multiple users to run tasks in parallel. No sudo permission is required.
11-
#
12-
# https://cirrus-ci.org/guide/persistent-workers/
13-
#
14-
# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+.
15-
#
16-
# The following specific types should exist, with the following requirements:
17-
# - small: For an x86_64 machine, with at least 2 vCPUs and 8 GB of memory.
18-
# - medium: For an x86_64 machine, with at least 4 vCPUs and 16 GB of memory.
19-
# - arm64: For an aarch64 machine, with at least 2 vCPUs and 8 GB of memory.
20-
#
21-
# CI jobs for the latter configuration can be run on x86_64 hardware
22-
# by installing qemu-user-static, which works out of the box with
23-
# podman or docker. Background: https://stackoverflow.com/a/72890225/313633
24-
#
25-
# The above machine types are matched to each task by their label. Refer to the
26-
# Cirrus CI docs for more details.
27-
#
28-
# When a contributor maintains a fork of the repo, any pull request they make
29-
# to their own fork, or to the main repository, will trigger two CI runs:
30-
# one for the branch push and one for the pull request.
31-
# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable
32-
# in Cirrus repository settings, accessible from
33-
# https://cirrus-ci.com/github/my-organization/my-repository
34-
#
35-
# On machines that are persisted between CI jobs, RESTART_CI_DOCKER_BEFORE_RUN=1
36-
# ensures that previous containers and artifacts are cleared before each run.
37-
# This requires installing Podman instead of Docker.
38-
#
39-
# Futhermore:
40-
# - podman-docker-4.1+ is required due to the bugfix in 4.1
41-
# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200)
42-
# - The ./ci/ dependencies (with cirrus-cli) should be installed. One-liner example
43-
# for a single user setup with sudo permission:
44-
#
45-
# ```
46-
# apt update && apt install git screen python3 bash podman-docker uidmap slirp4netns curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus
47-
# ```
48-
#
49-
# - There are no strict requirements on the hardware. Having fewer CPU threads
50-
# than recommended merely causes the CI script to run slower.
51-
# To avoid rare and intermittent OOM due to short memory usage spikes,
52-
# it is recommended to add (and persist) swap:
53-
#
54-
# ```
55-
# fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | tee -a /etc/fstab )
56-
# ```
57-
#
58-
# - To register the persistent worker, open a `screen` session and run:
59-
#
60-
# ```
61-
# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token
62-
# ```
63-
64-
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
65-
filter_template: &FILTER_TEMPLATE
66-
# Allow forks to specify SKIP_BRANCH_PUSH=true and skip CI runs when a branch is pushed,
67-
# but still run CI when a PR is created.
68-
# https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
69-
skip: $SKIP_BRANCH_PUSH == "true" && $CIRRUS_PR == ""
70-
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
71-
72-
base_template: &BASE_TEMPLATE
73-
<< : *FILTER_TEMPLATE
74-
merge_base_script:
75-
# Require git (used in fingerprint_script).
76-
- git --version || ( apt-get update && apt-get install -y git )
77-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
78-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
79-
- git config --global user.email "[email protected]"
80-
- git config --global user.name "ci"
81-
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
82-
83-
env_matrix_snippet: &ENV_MATRIX_VALGRIND
84-
- env:
85-
ENABLE_FIELDS: "7,32,58"
86-
- env:
87-
BUILD: distcheck
88-
- env:
89-
EXEC_CMD: valgrind --error-exitcode=42
90-
TESTRUNS: 1
91-
BUILD:
92-
93-
env_matrix_snippet: &ENV_MATRIX_SAN_VALGRIND
94-
- env:
95-
ENABLE_FIELDS: "11,64,37"
96-
- env:
97-
BUILD: distcheck
98-
- env:
99-
EXEC_CMD: valgrind --error-exitcode=42
100-
TESTRUNS: 1
101-
BUILD:
102-
- env:
103-
CXXFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
104-
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
105-
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
106-
BENCH: no
107-
108-
task:
109-
name: 'lint'
110-
<< : *BASE_TEMPLATE
111-
container:
112-
dockerfile: ci/linux-debian.Dockerfile
113-
memory: 2G
114-
cpu: 4
115-
matrix:
116-
<< : *ENV_MATRIX_SAN_VALGRIND
117-
matrix:
118-
- env:
119-
CXX: g++
120-
- env:
121-
CXX: clang++ -gdwarf-4
122-
<< : *MERGE_BASE
4+
### compiler options
5+
HOST:
6+
WRAPPER_CMD:
7+
# Specific warnings can be disabled with -Wno-error=foo.
8+
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
9+
WERROR_CFLAGS: -Werror -pedantic-errors
10+
MAKEFLAGS: -j4
11+
BUILD: check
12+
### secp256k1 config
13+
ECMULTWINDOW: 15
14+
ECMULTGENKB: 22
15+
ASM: no
16+
WIDEMUL: auto
17+
WITH_VALGRIND: yes
18+
EXTRAFLAGS:
19+
### secp256k1 modules
20+
EXPERIMENTAL: no
21+
ECDH: no
22+
RECOVERY: no
23+
EXTRAKEYS: no
24+
SCHNORRSIG: no
25+
MUSIG: no
26+
ELLSWIFT: no
27+
### test options
28+
SECP256K1_TEST_ITERS: 64
29+
BENCH: yes
30+
SECP256K1_BENCH_ITERS: 2
31+
CTIMETESTS: yes
32+
# Compile and run the tests
33+
EXAMPLES: yes
34+
35+
cat_logs_snippet: &CAT_LOGS
36+
always:
37+
cat_tests_log_script:
38+
- cat tests.log || true
39+
cat_noverify_tests_log_script:
40+
- cat noverify_tests.log || true
41+
cat_exhaustive_tests_log_script:
42+
- cat exhaustive_tests.log || true
43+
cat_ctime_tests_log_script:
44+
- cat ctime_tests.log || true
45+
cat_bench_log_script:
46+
- cat bench.log || true
47+
cat_config_log_script:
48+
- cat config.log || true
49+
cat_test_env_script:
50+
- cat test_env.log || true
51+
cat_ci_env_script:
52+
- env
53+
54+
linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER
55+
env_script:
56+
- env | tee /tmp/env
57+
build_script:
58+
- DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm"
59+
- docker image prune --force # Cleanup stale layers
12360
test_script:
12461
- ./ci/cirrus.sh
12562
<< : *CAT_LOGS
@@ -135,6 +72,7 @@ task:
13572
RECOVERY: yes
13673
EXTRAKEYS: yes
13774
SCHNORRSIG: yes
75+
MUSIG: yes
13876
ELLSWIFT: yes
13977
matrix:
14078
<< : *ENV_MATRIX_VALGRIND
@@ -195,6 +133,7 @@ task:
195133
RECOVERY: yes
196134
EXTRAKEYS: yes
197135
SCHNORRSIG: yes
136+
MUSIG: yes
198137
ELLSWIFT: yes
199138
WRAPPER_CMD: 'valgrind --error-exitcode=42'
200139
SECP256K1_TEST_ITERS: 2

0 commit comments

Comments
 (0)