Skip to content

fix(release): build Linux artifacts without CUDA and gate on it - #10

Open
MeABzZz wants to merge 1 commit into
BTCDecoded:mainfrom
MeABzZz:criticals/release-no-cuda
Open

MeABzZz wants to merge 1 commit into
BTCDecoded:mainfrom
MeABzZz:criticals/release-no-cuda

Conversation

@MeABzZz

@MeABzZz MeABzZz commented Oct 21, 2026 •

Copy link
Copy Markdown

What

The published v0.1.63 and v0.1.64 Linux x86_64 artifacts don't start on a machine without CUDA. Every ELF in the binary, the tarball and the .deb lists libcudart.so.13 in NEEDED, and the .deb has an empty Depends. That includes the Umbrel image, which runs the GitHub binary.

$ ./blvm-0.1.64-linux-x86_64 version
error while loading shared libraries: libcudart.so.13: cannot open shared object file   (exit 127)

The cause is that blvm-secp256k1 <= 0.1.13 links CUDA whenever nvcc is on the build host, and the release runner has it. The root fix is BTCDecoded/blvm-secp256k1#1, which makes CUDA opt-in. This PR fixes the release now and stops it from happening again.

  • BLVM_SECP256K1_NO_GPU=1 is set on the Linux base build, experimental build and packaging steps. The published secp versions already honour it.
  • New scripts/check-no-cuda.sh checks every ELF inside each Linux tarball and .deb before upload, and fails the release if any of them needs a CUDA library.
  • The release test step is unchanged. It builds --all-features, which turns on secp-gpu on purpose, and setting the env there would make that build panic.

Evidence

The build host has a CUDA 13 toolkit with CUDA_PATH set, like the runner. blvm was built from main against published crates with --features production, the same way the release builds it.

Build NEEDED libcudart.so.13 blvm version without CUDA
Published secp 0.1.12, no env (current release) yes exit 127
Published secp 0.1.12, BLVM_SECP256K1_NO_GPU=1 (this PR) no exit 0
secp from blvm-secp256k1#1, no env no exit 0; regtest getblockcount → 0

check-no-cuda.sh run against the published artifacts:

  • v0.1.63 binary: FAIL
  • v0.1.63 .deb (/usr/bin/blvm): FAIL
  • v0.1.63 tarball: FAIL for blvm, blvm-sign, blvm-verify, blvm-keygen, blvm-commons, key-manager and test-content-hash
  • v0.1.64 .deb: FAIL
  • Exit code 1 for each. The script exits 0 on the fixed builds above.

shellcheck is clean, and the workflow YAML parses.

Not in this PR

  • The release isn't re-cut. v0.1.63 and v0.1.64 stay broken until a new release runs with this change.
  • prerelease.yml and nightly-prerelease.yml build the same way and probably need the same env and gate.
  • The GHCR image ships a different binary (blvm 0.1.0, Git c049ac6), not the release. That is review finding H10 and isn't addressed here.
  • Cargo.lock pins secp 0.1.12, so it needs cargo update -p blvm-secp256k1 once secp#1 is released.

Review notes: merge order and open decisions (BLVM criticals set)

This PR is one of 7 fixing the four criticals from the BLVM three-lens review:
blvm-consensus#22 (undo log), blvm-consensus#23 (PoW vs target), blvm-node#32 (PoW test fixture), blvm-primitives#2 (min chainwork), blvm-node#31 (assume-valid), blvm-secp256k1#1 (no CUDA by default), blvm#10 (release build + no-CUDA check).

Merge order

  1. blvm-node#32 before blvm-consensus#23, otherwise node CI breaks (old fixture headers have no valid PoW).
  2. After the blvm-primitives release with Improve CLI help text #2, regenerate the consensus golden file consensus_config_default.json, or its test fails.
  3. After the blvm-secp256k1 release with Add configuration examples #1, run cargo update -p blvm-secp256k1 in blvm, then cut a release with blvm#10. v0.1.63 and v0.1.64 stay broken (need libcudart) until then.

Decisions for the reviewer

  • PoW scope (#23): checked on every node path; library/test calls that skip the difficulty lookup stay unchecked. Checking always would match Core but means re-mining all test fixtures.
  • Undo log (#22): nodes already synced on old code have empty undo logs stored and need a resync before a deep reorg is safe. Put this in release notes.
  • Assume-valid (#31): BLVM rejects any block at height 938343 with a different hash, so it acts as a hard checkpoint (Core never does this). Kept as-is; testnet4 stays fully verified.

Known, not fixed here: -assumevalid=<hash> CLI parses the hash in the wrong byte order; the GHCR image ships a different binary (blvm 0.1.0).

blvm 0.1.63 and 0.1.64 x86_64 binaries, tarball members and .deb all list
libcudart.so.13 in NEEDED, the .deb has no Depends on it, and the binary
exits 127 ("error while loading shared libraries: libcudart.so.13") on
any machine without the CUDA runtime, including the Umbrel image.
blvm-secp256k1 <= 0.1.13 links CUDA whenever its build host has nvcc,
and the release runner does.

Set BLVM_SECP256K1_NO_GPU=1 on the Linux build and packaging steps, which
those secp versions already honour, so this works before a secp release
with CUDA opt-in. Add scripts/check-no-cuda.sh and run it on every Linux
tarball and .deb before upload; it fails the release if any ELF inside
needs a CUDA library. The test step is untouched: it builds
--all-features, which turns on secp-gpu on purpose.

Evidence: check-no-cuda.sh on the published v0.1.63 binary, .deb and
tarball, and the v0.1.64 .deb, exits 1 and names libcudart.so.13 for
each ELF. shellcheck is clean.
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.

1 participant