From 51d617e70f90a972185917ea0096c1ecef2bfa8b Mon Sep 17 00:00:00 2001 From: Bitflash-sh Date: Fri, 24 Jul 2026 11:18:11 -0300 Subject: Bitflash: fair-launch release Satoshi's bitcoin-0.1.0 reborn with RandomX CPU proof of work, anonymous .btf addressing over Nostr with CGNAT rendezvous, automatic peer discovery, a headless Linux node, and Windows GUI wallet. Fair launch, no premine, 21M cap. --- build-linux.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 build-linux.sh (limited to 'build-linux.sh') diff --git a/build-linux.sh b/build-linux.sh new file mode 100644 index 0000000..bb11e82 --- /dev/null +++ b/build-linux.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# Bitflash headless node/miner -- one-shot Linux build (Debian/Ubuntu). +# Builds the dependencies (libsecp256k1 with schnorrsig, RandomX) and then the +# node itself. Run from the project root (the directory that contains src/): +# +# bash build-linux.sh +# +# Result: src/bitflash-node . Run it with: ./src/bitflash-node -gen + +set -e +ROOT="$(cd "$(dirname "$0")" && pwd)" +cd "$ROOT" + +# Use sudo only when not already root (a root login often has no sudo installed). +SUDO="" +if [ "$(id -u)" -ne 0 ]; then SUDO="sudo"; fi + +echo "==> installing system packages" +if command -v apt-get >/dev/null 2>&1; then + $SUDO apt-get update + $SUDO apt-get install -y build-essential cmake git pkg-config autoconf libtool \ + libssl-dev libdb5.3++-dev libsodium-dev nlohmann-json3-dev libboost-dev +else + echo "!! non-apt system: install manually -> g++ cmake git autoconf libtool" + echo " libssl-dev libdb++-dev libsodium-dev nlohmann-json (headers)" +fi + +# ---- libsecp256k1 (Schnorr/BIP340 + extrakeys), static, installed to /usr/local +if [ ! -f /usr/local/lib/libsecp256k1.a ]; then + echo "==> building libsecp256k1" + rm -rf "$ROOT/secp256k1-build" + git clone --depth 1 https://github.com/bitcoin-core/secp256k1 "$ROOT/secp256k1-build" + cd "$ROOT/secp256k1-build" + ./autogen.sh + ./configure --enable-module-schnorrsig --enable-module-extrakeys \ + --disable-shared --with-pic --disable-benchmark --disable-tests + make -j"$(nproc)" + $SUDO make install + $SUDO ldconfig + cd "$ROOT" +else + echo "==> libsecp256k1 already installed, skipping" +fi + +# ---- RandomX (memory-hard CPU PoW), static lib +if [ ! -f "$HOME/RandomX/build/librandomx.a" ]; then + echo "==> building RandomX" + rm -rf "$HOME/RandomX" + git clone --depth 1 https://github.com/tevador/RandomX "$HOME/RandomX" + mkdir -p "$HOME/RandomX/build" + cd "$HOME/RandomX/build" + cmake .. -DCMAKE_BUILD_TYPE=Release + make -j"$(nproc)" randomx + cd "$ROOT" +else + echo "==> RandomX already built, skipping" +fi + +# ---- the node +echo "==> building bitflash-node" +cd "$ROOT/src" +make -f makefile.linux RANDOMX_DIR="$HOME/RandomX" -j"$(nproc)" + +echo +echo "===================================================================" +echo " DONE. Binary: $ROOT/src/bitflash-node" +echo +echo " Mine: ./src/bitflash-node -gen" +echo " Custom data dir: ./src/bitflash-node -gen -datadir=\$HOME/.bitflash" +echo " Run as a service: see linux-node.service note in the README" +echo "===================================================================" -- cgit v1.2.3