Skip to content

refactor: remove relic and GMP dependency - #7679

Draft
knst wants to merge 5 commits into
dashpay:developfrom
knst:refactor-remove-relic
Draft

knst wants to merge 5 commits into
dashpay:developfrom
knst:refactor-remove-relic

Conversation

@knst

@knst knst commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

The dependency RELIC and GMP are heavy but not used since #7678 is merged.

This PR is draft as it depends on #7678

What was done?

Removed GMP from list of dependencies and updated relevant files.

Everything that only served the standalone library [bls-signatures] build or the relic backend is removed: the relic tree, the CMake and autotools files, the Go/Rust/JS/Python bindings and their helper scripts, the relic differential fuzzer and the library benchmark.

What stays is what Dash Core builds and tests: the library sources and headers, the Catch2 test with its relic reference vectors (plus the generator that produced them), mimalloc, LICENSE, NOTICE and README.

NOTICE now lists blst instead of relic, GMP and pybind11, and contrib/debian/copyright gains entries for dashbls and mimalloc.

How Has This Been Tested?

Build Dash Core

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

blst (https://github.com/supranational/blst) is the BLS12-381 backend of
the upcoming src/dashbls update. The package runs blst's own build.sh and
installs libblst.a plus bindings/blst.h and blst_aux.h into the depends
prefix. __BLST_PORTABLE__ selects runtime CPU dispatch so the build does
not depend on the builder's CPU flags.
src/dashbls is no longer a configure sub-project. Its library, the
vendored mimalloc secure allocator and its Catch2 test binary are built by
the new src/Makefile.dashbls.include as libtool convenience libraries, the
same way crc32c and leveldb are, and dashbls/runtest (including the relic
reference vectors) is part of `make check`. The BLS12-381 backend blst is
detected by configure and linked from depends (or the system).

The library's PrivateKey::Serialize no longer takes a scheme flag, so
CBLSWrapper dispatches on the implementation type; the secure allocator
pool is sized for the largest blst object; the relic macro workarounds in
bls/bls.h are gone.
GMP was only needed by relic, the previous backend of src/dashbls.
Remove the depends package and its patch, the configure checks and the
GMP_LIBS link entries, and the build documentation that told users to
install it.
Everything that only served the standalone library build or the relic
backend goes: the relic tree, the CMake and autotools files, the
Go/Rust/JS/Python bindings and their helper scripts, the relic
differential fuzzer and the library benchmark. What stays is what Dash
Core builds and tests: the library sources and headers, the Catch2 test
with its relic reference vectors (plus the generator that produced them),
mimalloc, LICENSE, NOTICE and README.

NOTICE now lists blst instead of relic, GMP and pybind11, and
contrib/debian/copyright gains entries for dashbls and mimalloc.
@thepastaclaw

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because this PR is a draft.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit cfd06b0. Normal review starts when eligible; priority review starts as soon as a slot is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants