Skip to content

Commit 83d0727

Browse files
committed
Squashed 'src/dashbls/' changes from dd683653c6..6169ee9c91
6169ee9c91 Merge pull request #120 from kwvg/bump_2.0 8b8e492967 chore: bump version to 2.0 e367139843 Merge pull request #119 from PastaPastaPasta/various-optimizations 6dc1515724 fix: include array 290a787340 fix: compilation error 44bbdd6d2e perf: CoreMPL::Aggregate needs a vector, this implicitly allocates vecPublicKeys.size() times 776a061b8b perf: remove unneeded SecAlloc in SignG2 7b1fb5a17f perf: remove unused bn_t one e2ee41d376 perf: use reserve where trivial b6c08aa624 perf: avoid extra allocations and copies in HashPubKeys 829291f4c2 fix: leak in HashPubKeys b94489cb3e fix: memory leak in CoreMPL::AggregateSecure, call bn_free for each time we call bn_new 483003da88 fix: avoid allocation churn in DivFP; fix memory leak 6e7c89a18b fix: add a destructor to fix a memory leak 05a79d2b44 perf: avoid unneeded vector allocation in Add d7958a05f6 Revert "perf: use unordered_set and fail fast in BasicSchemeMPL::AggregateVerify" a19de6290b perf: use unordered_set and fail fast in BasicSchemeMPL::AggregateVerify e25c2e34c7 perf: prefer serialize to array 7c1d20a6af perf: use serializeToArray 4e833dbc1f fix: include <array> 9141e14446 perf: in CoreMPL::Aggregate return array 10744ea62f perf: don't use vector for constant sized 2af62e2b62 Merge pull request #116 from kwvg/bump_mimalloc_3.0.10 7bec91a655 patch: add awareness for different page sizes 03bf222cad patch: swap conditions to evaluate emscripten-specific case earlier cae3f99ee8 patch: s/mi_align_up_ptr/_mi_align_up_ptr/g e79044797a ci: build with debug enabled 1ca74c12c8 build: prefer debug mimalloc lib over release lib for Rust and Go binds c47c84e409 build: update build files for `mimalloc` subtree bump a325850bfd build: harmonize cmake version across dependencies f064d8fe7f depends: commit microsoft/mimalloc@dfa50c37 to source tree as da7905c9 da7905c923 Squashed 'depends/mimalloc/' changes from 91ba1f374..dfa50c37d b4622d0c7a revert: update cmake 160dd95097 Merge pull request #117 from kwvg/homekeep_p2 79775723d9 revert: disable Go bindings CI for macos for now ef58d4306a chore(ci): bump Go to 1.24 f4242f46df ci: add Rust 1.91 to build matrix, test bindings fc54fc58c8 chore(ci): bump Python version matrix to test 3.10 to 3.13 2881362fd9 fix: account for API changes introduced in Python 3.13 in binds 3c7fa5c41c build: apply review suggestions for Go binds Makefile 3dafb33875 build: add Homebrew and MacPorts awareness in Go binds Makefile bb72770c97 refactor: shuffle contents of Go binds Makefile dd4766212b build: drop standalone library definition comments from Go binds 68905cdbad build: enable runtime assertions for WASM debug builds 9368177b81 build: ensure LINK_FLAGS actually propagate to blsjstmp b0006ab1e9 Merge pull request #118 from kwvg/fix_sz a47caad61a refactor: use the size of the buffer in the Python binds when possible 8b200a6640 fix: correct typo in Python bindings f91afeec90 fix!: pass the actual size of the buffer from the Go bindings 9605703c78 fix!: pass the actual size of the buffer from the Rust bindings git-subtree-dir: src/dashbls git-subtree-split: 6169ee9c9141d209c2a576f0e2e99856b2ee3e25
1 parent e686744 commit 83d0727

File tree

261 files changed

+27240
-18129
lines changed

Some content is hidden

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

261 files changed

+27240
-18129
lines changed

.github/workflows/build-binds.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ concurrency:
1717

1818
jobs:
1919
build:
20-
name: ${{ matrix.os }}, Python ${{ matrix.python }}, Go ${{ matrix.golang }}
20+
name: ${{ matrix.os }}, Python ${{ matrix.python }}, Go ${{ matrix.golang }}, Rust ${{ matrix.rust }}
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
os: [macos-latest, ubuntu-latest]
26-
golang: [ '1.22' ]
27-
python: ['3.9', '3.10', '3.11', '3.12']
26+
golang: [ '1.24' ]
27+
python: ['3.10', '3.11', '3.12', '3.13']
28+
rust: [ '1.91.0' ]
2829

2930
steps:
3031
- name: Checkout code
@@ -73,12 +74,23 @@ jobs:
7374
- name: Build library using CMake
7475
run: |
7576
mkdir -p build && cd build
76-
cmake ..
77+
cmake .. -DCMAKE_BUILD_TYPE=Debug
7778
cmake --build . -- -j 6
7879
7980
- name: Build Go bindings
80-
# TODO: macos build is broken. Whoever needs this - please fix it and remove `if` below.
81-
if: startsWith(matrix.os, 'ubuntu')
8281
run: |
8382
cd go-bindings
83+
make config
8484
make
85+
86+
- name: Install Rust
87+
run: |
88+
rustup toolchain install ${{ matrix.rust }}
89+
rustup default ${{ matrix.rust }}
90+
rustc --version
91+
cargo --version
92+
93+
- name: Build and test Rust bindings
94+
run: |
95+
cd rust-bindings/bls-dash-sys
96+
cargo test

.github/workflows/build-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
if: startsWith(matrix.builder, 'cmake')
5454
run: |
5555
mkdir -p build && cd build
56-
CC=${{ matrix.compiler.cc }} CXX=${{ matrix.compiler.cxx }} cmake .. -DBUILD_BLS_PYTHON_BINDINGS=0 -DARITH=${{ matrix.backend }}
56+
CC=${{ matrix.compiler.cc }} CXX=${{ matrix.compiler.cxx }} cmake .. -DARITH=${{ matrix.backend }} -DBUILD_BLS_PYTHON_BINDINGS=0 -DCMAKE_BUILD_TYPE=Debug
5757
cmake --build . -- -j 6
5858
mv src/runtest ..
5959

Makefile.mimalloc.include

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Copyright (c) 2022 The Dash Core developers
1+
# Copyright (c) 2022-2025 The Dash Core developers
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php.
44

55
LIBMIMALLOC = libmimalloc-secure.la
66

7-
MIMALLOC_CFLAGS = \
7+
MIMALLOC_CPPFLAGS = \
88
-DMI_SECURE=4 \
99
-DNDEBUG
1010

@@ -13,32 +13,34 @@ MIMALLOC_INCLUDES = \
1313
-I$(top_srcdir)/depends/mimalloc/src
1414

1515
MIMALLOC_H = \
16-
depends/mimalloc/include/mimalloc.h \
17-
depends/mimalloc/include/mimalloc-atomic.h \
18-
depends/mimalloc/include/mimalloc-internal.h \
19-
depends/mimalloc/include/mimalloc-new-delete.h \
20-
depends/mimalloc/include/mimalloc-override.h \
21-
depends/mimalloc/include/mimalloc-track.h \
22-
depends/mimalloc/include/mimalloc-types.h \
16+
depends/mimalloc/include/mimalloc-new-delete.h \
17+
depends/mimalloc/include/mimalloc-override.h \
18+
depends/mimalloc/include/mimalloc-stats.h \
19+
depends/mimalloc/include/mimalloc.h \
2320
depends/mimalloc/src/bitmap.h
2421

2522
libmimalloc_secure_la_SOURCES = \
2623
$(MIMALLOC_H) \
27-
depends/mimalloc/src/stats.c \
28-
depends/mimalloc/src/random.c \
29-
depends/mimalloc/src/os.c \
30-
depends/mimalloc/src/bitmap.c \
31-
depends/mimalloc/src/arena.c \
32-
depends/mimalloc/src/segment-cache.c \
33-
depends/mimalloc/src/segment.c \
34-
depends/mimalloc/src/page.c \
35-
depends/mimalloc/src/alloc.c \
3624
depends/mimalloc/src/alloc-aligned.c \
3725
depends/mimalloc/src/alloc-posix.c \
26+
depends/mimalloc/src/alloc.c \
27+
depends/mimalloc/src/arena-meta.c \
28+
depends/mimalloc/src/arena.c \
29+
depends/mimalloc/src/bitmap.c \
3830
depends/mimalloc/src/heap.c \
31+
depends/mimalloc/src/init.c \
32+
depends/mimalloc/src/libc.c \
3933
depends/mimalloc/src/options.c \
40-
depends/mimalloc/src/init.c
34+
depends/mimalloc/src/os.c \
35+
depends/mimalloc/src/page-map.c \
36+
depends/mimalloc/src/page.c \
37+
depends/mimalloc/src/random.c \
38+
depends/mimalloc/src/stats.c \
39+
depends/mimalloc/src/prim/prim.c
4140

42-
libmimalloc_secure_la_CFLAGS = $(AM_CFLAGS) $(MIMALLOC_INCLUDES) $(MIMALLOC_CFLAGS)
41+
libmimalloc_secure_la_CPPFLAGS = $(AM_CPPFLAGS) $(MIMALLOC_CPPFLAGS) $(MIMALLOC_INCLUDES)
42+
libmimalloc_secure_la_CXXFLAGS = $(AM_CXXFLAGS)
43+
libmimalloc_secure_la_CFLAGS = $(AM_CFLAGS)
44+
libmimalloc_secure_la_LDFLAGS = $(AM_LDFLAGS)
4345

4446
noinst_LTLIBRARIES += $(LIBMIMALLOC)

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AC_PREREQ([2.60])
2-
AC_INIT([libdashbls],[1.3.6])
2+
AC_INIT([libdashbls],[2.0])
33
AC_CONFIG_AUX_DIR([build-aux])
44
AC_CONFIG_MACRO_DIR([build-aux/m4])
55

depends/mimalloc/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
build
12
ide/vs20??/*.db
23
ide/vs20??/*.opendb
34
ide/vs20??/*.user
4-
ide/vs20??/*.vcxproj.filters
55
ide/vs20??/.vs
66
ide/vs20??/VTune*
77
out/
88
docs/
99
*.zip
10+
*.tar
11+
*.gz
12+
.vscode
13+
.DS_STore

0 commit comments

Comments
 (0)