Skip to content

build: drop the Autotools build and the libsodium allocator - #138

Merged
PastaPastaPasta merged 2 commits into
dashpay:developfrom
knst:cleanup-build-deps
Oct 26, 2026
Merged

PastaPastaPasta merged 2 commits into
dashpay:developfrom
knst:cleanup-build-deps

Conversation

@knst

@knst knst commented Oct 21, 2026

Copy link
Copy Markdown

What was done here

Prerequisite for #132, split out on reviewer request so the blst migration does not carry build-system removals.
Dash Core is to integrate bls-signature's cpp files to own build, see dashpay/dash#7678 and it was the only consumer of autoconf's build.

Sodium is removed as it had been never used:
#132 (comment)

  1. build: drop the Autotools build — removes configure.ac, Makefile.am, the Makefile.*.include fragments, autogen.sh, the m4 macros and the Autotools half of the CI matrix. The library is built with CMake only; Dash Core compiles the sources with its own build system.

  2. build: drop the libsodium secure allocator — removes the BLSALLOC_SODIUM branch of BLS::Init(), the unreferenced cmake_modules/Findsodium.cmake and the commented-out sodium link lines in the Rust and Apple build scripts. No build selected it: CMake defines BLSALLOC_MIMALLOC=1, Dash Core defines no BLSALLOC_* macro and takes the malloc/free branch.

Removal only: 5 insertions, 3562 deletions. No behaviour change.

How it has been tested

CMake build on relic, runtest: all tests passed (1460 assertions in 23 test cases).
git grep -i sodium and git grep -i autogen are empty outside depends/relic.

See also #7678 to test build of Dash Core with new system [could be really used only when #132 is merged].

knst added 2 commits October 21, 2026 23:58
The library is built with CMake only; Dash Core compiles the sources with
its own build system and does not use this Autotools setup. Remove the
configure script, the Makefile fragments, autogen.sh, the m4 macros and
the Autotools half of the CI matrix.
No build selects BLSALLOC_SODIUM: CMake compiles with BLSALLOC_MIMALLOC=1
and Dash Core defines no BLSALLOC_* macro, so it already takes the plain
malloc/free branch. Remove the sodium branch of BLS::Init(), the
Findsodium.cmake module that no CMakeLists references, and the
commented-out sodium link lines in the bindings, so the library has no
libsodium dependency, optional or otherwise.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 336a326f-a8dc-486b-bf8e-12bf93ed6554

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@knst
knst requested a review from kwvg October 21, 2026 17:08
@thepastaclaw

thepastaclaw commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Final review complete — no blockers (commit 028dd09) · triage: normal

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

The removal of the unused libsodium allocator and Autotools build does not introduce a functional or cryptographic regression in the reviewed range. However, the edited SecAlloc comment still promises paging protection and zeroing that the retained default callbacks do not guarantee; this should be corrected. Native Linux checks have passed, while macOS and several binding/package checks remain queued.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — Removing an entire build system and its CI coverage alongside an unused allocator branch is a cross-cutting build cleanup, but the diff does not make large or intricate changes to cryptography or key handling.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (lane failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `include/dashbls/util.hpp`:
- [SUGGESTION] include/dashbls/util.hpp:82-85: Remove unsupported paging and zeroing guarantees from SecAlloc documentation
  The comment was modified by this PR but still claims that SecAlloc prevents paging to disk and zeroes memory when freed. SecAlloc and SecFree only invoke the configured callbacks; the retained defaults are mi_malloc/mi_free or malloc/free, and neither implementation provides those guarantees by itself. Document the callback-dependent behavior so callers do not infer libsodium-level protections from the API.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Define explicit secret-memory erasure and paging guarantees — Private-key cleanup still relies on the configured free callback, and the default allocator paths do not explicitly erase or lock sensitive memory. This is pre-existing hardening work rather than a regression introduced by removing the unused sodium branch, but the library should eventually define and enforce its secret-memory protection contract.
    • Follow-up: Track separately as a security-hardening issue covering non-optimizable erasure, sensitive derivation buffers, and any required locked-memory behavior.

Comment thread include/dashbls/util.hpp
Comment on lines 82 to 85
/*
* Securely allocates a portion of memory, using libsodium. This prevents
* paging to disk, and zeroes out the memory when it's freed.
* Securely allocates a portion of memory. This prevents paging to disk,
* and zeroes out the memory when it's freed.
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Remove unsupported paging and zeroing guarantees from SecAlloc documentation

The comment was modified by this PR but still claims that SecAlloc prevents paging to disk and zeroes memory when freed. SecAlloc and SecFree only invoke the configured callbacks; the retained defaults are mi_malloc/mi_free or malloc/free, and neither implementation provides those guarantees by itself. Document the callback-dependent behavior so callers do not infer libsodium-level protections from the API.

Suggested change
/*
* Securely allocates a portion of memory, using libsodium. This prevents
* paging to disk, and zeroes out the memory when it's freed.
* Securely allocates a portion of memory. This prevents paging to disk,
* and zeroes out the memory when it's freed.
*/
/*
* Allocates memory using the configured allocator callback.
* Paging protection and zeroing on free depend on the installed allocator
* callbacks.
*/

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-reviewer: general, security-auditor)

@kwvg kwvg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 028dd09

@PastaPastaPasta
PastaPastaPasta merged commit deebfcb into dashpay:develop Oct 26, 2026
50 of 59 checks passed
@knst
knst deleted the cleanup-build-deps branch October 26, 2026 07:55
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.

4 participants