Repository navigation
build: follow-ups to the blst migration #8107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
5c259f4
393e92d
79ae017
81e0bc5
c6f5dfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,8 @@ pkg_add bash git gmake libevent libtool boost zstd | |
| pkg_add autoconf automake python | ||
| ``` | ||
|
|
||
| blst is not available as an OpenBSD package; build it as described in [build-unix.md](build-unix.md#blst), using `sha256 -c` in place of `sha256sum -c`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the OpenBSD checksum format. OpenBSD 7.3 Provide a replacement checksum line in the form
|
||
|
|
||
| See [dependencies.md](dependencies.md) for a complete overview. | ||
|
|
||
| ### 2. Clone Dash Core Repo | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,8 @@ sudo apt-get install libbacktrace-dev libevent-dev libboost-dev | |
| Note: libbacktrace-dev is available in Debian 13 (Trixie) and Ubuntu 25.04+. | ||
| For older releases, use the /depends/README.md which includes all required libraries. | ||
|
|
||
| blst is required and not packaged by Debian or Ubuntu; build it as described in [blst](#blst). | ||
|
|
||
| SQLite is required for the descriptor wallet: | ||
|
|
||
| ```sh | ||
|
|
@@ -132,6 +134,8 @@ sudo dnf install libevent-devel boost-devel | |
|
|
||
| Note: Fedora repositories do not include libbacktrace. To build Dash Core without stack trace support, configure with `--disable-stacktraces`. | ||
|
|
||
| blst is required and not packaged by Fedora; build it as described in [blst](#blst). | ||
|
|
||
| SQLite is required for the descriptor wallet: | ||
|
|
||
| ```sh | ||
|
|
@@ -200,6 +204,28 @@ See [dependencies.md](dependencies.md) for a complete overview, and | |
| [depends](/depends/README.md) on how to compile them yourself, if you wish to | ||
| not use the packages of your Linux distribution. | ||
|
|
||
| ### blst | ||
|
|
||
| [blst](https://github.com/supranational/blst) is required. Some distributions do not package it, so build it yourself: | ||
| ```bash | ||
| curl -fLO https://github.com/supranational/blst/archive/refs/tags/v0.3.17.tar.gz && \ | ||
| echo "c3fef37b566b67419703b2bbb648e15176276af9a880c22aa8f5f2e8cecc2e4d v0.3.17.tar.gz" | sha256sum -c && \ | ||
| tar -xzf v0.3.17.tar.gz && \ | ||
| (cd blst-0.3.17 && ./build.sh -D__BLST_PORTABLE__) | ||
| ``` | ||
| `-D__BLST_PORTABLE__` makes blst pick its ADX code path at run time, as the depends build does. Without it the library uses ADX whenever the build machine has it, and the resulting binaries crash with an illegal instruction on CPUs that lack it. | ||
|
|
||
| and configure from the Dash Core source directory using the following: | ||
| ```bash | ||
| export BLST_DIR="/path/to/blst-0.3.17" | ||
|
|
||
| ./configure \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Run Dash Core’s configure script from its source directory. The preceding commands leave the shell in
|
||
| BLST_CPPFLAGS="-I${BLST_DIR}/bindings" \ | ||
| LDFLAGS="-L${BLST_DIR}" | ||
|
Comment on lines
+222
to
+224
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combine the blst flags with the platform configuration command. The NetBSD, OpenBSD, and macOS guides each run another
|
||
| ``` | ||
|
|
||
| **Note**: Make sure that `BLST_DIR` is an absolute path. | ||
|
|
||
| ### Berkeley DB | ||
|
|
||
| The legacy wallet uses Berkeley DB. To ensure backwards compatibility it is | ||
|
|
@@ -257,4 +283,6 @@ make check | |
| ./src/dashd | ||
| ``` | ||
|
|
||
| blst is not in the Arch Linux repositories; build it as described in the [blst](#blst) section and pass its paths to `./configure`. | ||
|
|
||
| If you intend to work with legacy Berkeley DB wallets, see [Berkeley DB](#berkeley-db) section. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Build System | ||
| ------------ | ||
|
|
||
| - BLS signatures are now computed with [blst](https://github.com/supranational/blst) instead of relic. Unlike relic, blst is not part of the Dash Core source tree, so builds without `depends` need blst 0.3.17 installed. Some distributions do not package it; see the blst section of `doc/build-unix.md` for building it from source. (#7678) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,7 +93,7 @@ dashbls_libmimalloc_secure_la_SOURCES = \ | |
| dashbls/depends/mimalloc/src/prim/prim.c | ||
|
|
||
| dashbls_libmimalloc_secure_la_CPPFLAGS = $(AM_CPPFLAGS) $(MIMALLOC_CPPFLAGS_INT) | ||
| dashbls_libmimalloc_secure_la_CFLAGS = $(AM_CFLAGS) $(PIE_FLAGS) -static | ||
| dashbls_libmimalloc_secure_la_CFLAGS = $(AM_CFLAGS) $(HARDENED_CXXFLAGS) $(PIE_FLAGS) -static | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| dashbls_libmimalloc_secure_la_LDFLAGS = $(AM_LDFLAGS) -static | ||
|
|
||
| if ENABLE_TESTS | ||
|
|
@@ -113,3 +113,17 @@ dashbls_runtest_LDADD = $(LIBDASHBLS) | |
| dashbls_runtest_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -static | ||
| endif | ||
| endif | ||
|
|
||
| if ENABLE_BENCH | ||
| if !ENABLE_FUZZ | ||
| noinst_PROGRAMS += dashbls/runbench | ||
|
|
||
| dashbls_runbench_SOURCES = \ | ||
| dashbls/src/test-bench.cpp \ | ||
| dashbls/include/dashbls/test-utils.hpp | ||
| dashbls_runbench_CPPFLAGS = $(AM_CPPFLAGS) $(DASHBLS_CPPFLAGS_INT) | ||
| dashbls_runbench_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | ||
| dashbls_runbench_LDADD = $(LIBDASHBLS) | ||
| dashbls_runbench_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) -static | ||
| endif | ||
| endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,8 @@ | |
|
|
||
| # -fsanitize=undefined suppressions | ||
| # ================================= | ||
| nonnull-attribute:dashbls/ | ||
| nonnull-attribute:dashbls/include/dashbls/hkdf.hpp | ||
| nonnull-attribute:dashbls/include/dashbls/util.hpp | ||
|
|
||
| # -fsanitize=integer suppressions | ||
| # =============================== | ||
|
|
@@ -19,16 +20,19 @@ implicit-integer-sign-change:*/include/boost/ | |
| implicit-integer-sign-change:*/include/c++/ | ||
| implicit-integer-sign-change:*/new_allocator.h | ||
| implicit-integer-sign-change:crc32c/ | ||
| implicit-integer-sign-change:dashbls/ | ||
| implicit-integer-sign-change:dashbls/include/dashbls/util.hpp | ||
| implicit-integer-sign-change:dashbls/src/extendedprivatekey.cpp | ||
| implicit-integer-sign-change:dashbls/src/extendedpublickey.cpp | ||
| implicit-integer-sign-change:dashbls/src/test.cpp | ||
| implicit-integer-sign-change:minisketch/ | ||
| implicit-integer-sign-change:secp256k1* | ||
| implicit-signed-integer-truncation:*/include/c++/ | ||
| implicit-signed-integer-truncation:dashbls/ | ||
| implicit-signed-integer-truncation:dashbls/include/dashbls/test-utils.hpp | ||
| implicit-signed-integer-truncation:leveldb/ | ||
|
Comment on lines
29
to
31
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🔴 Blocking: Handle byte truncation before removing the dashbls suppression Removing source:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved (re-reviewed at
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Withdrawn (re-reviewed at |
||
| implicit-signed-integer-truncation:secp256k1* | ||
| implicit-signed-integer-truncation,implicit-integer-sign-change:secp256k1_modinv64_posdivsteps_62_var | ||
| implicit-unsigned-integer-truncation:*/include/c++/ | ||
| implicit-unsigned-integer-truncation:dashbls/ | ||
| implicit-unsigned-integer-truncation:dashbls/include/dashbls/util.hpp | ||
| implicit-unsigned-integer-truncation:leveldb/ | ||
| implicit-unsigned-integer-truncation:secp256k1* | ||
| implicit-signed-integer-truncation,implicit-integer-sign-change:secp256k1* | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 Nitpick: Document checksum verification alternatives for BSD readers
The OpenBSD note says to replace GNU
sha256sum -cwithsha256 -c, but OpenBSD'ssha256 -cexpects the expected digest as an argument rather than consuming the GNU-formatdigest filenamerecord from standard input. A reader following the documented substitution still cannot verify the archive. Document an executable OpenBSD command such assha256 -c c3fef37b566b67419703b2bbb648e15176276af9a880c22aa8f5f2e8cecc2e4d v0.3.17.tar.gz.source:
gpt-6.1-sol(phase2-reviewer: general)