Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8eeb3bb
fix build on darwin using nix
edilmedeiros Jun 5, 2026
f5f7ecc
build: revert nixpkgs pin to 25.11
LucasMABF Jun 22, 2026
7a3b321
docs: note multi-platform flake and macOS linker path
LucasMABF Jun 22, 2026
2104aaf
build: add non-nix build path
LucasMABF Jun 22, 2026
d699460
fix(blockscipy): support modern range-v3 bindings
yan-pi Jun 22, 2026
7980aa2
fix(blockscipy): restore address type formatting
yan-pi Jun 22, 2026
fb5e412
fix(tests): support zoneinfo timezones
yan-pi Jun 22, 2026
0bcebf6
fix(blockscipy): avoid fork warnings on modern macos
yan-pi Jun 22, 2026
820060b
fix(blockscipy): make miner labels optional
yan-pi Jun 22, 2026
c5c1dca
chore(nix): fetch miner labels without submodule
yan-pi Jun 22, 2026
ff68703
feat(nix): provide nix-only dev shell and btc check
yan-pi Jun 22, 2026
a9b3428
docs(nix): document nix-only workflow
yan-pi Jun 23, 2026
41242f5
chore(repo): ignore local build artifacts
yan-pi Jun 22, 2026
25c798e
build(blockscipy): disable pybind11 lto extras
yan-pi Jun 22, 2026
115cc40
build(blockscipy): reduce gcc binding optimization pressure
yan-pi Jun 22, 2026
dd5acd6
build(blockscipy): respect nix build cores in cmake
yan-pi Jun 23, 2026
ac5e8d7
docs(nix): document build parallelism and logs
yan-pi Jun 23, 2026
955110b
bump nixpkgs version
edilmedeiros Jun 27, 2026
0a4efe6
Add direnv to gitignore
edilmedeiros Jun 27, 2026
e6123f6
fix: macos native build
IsaqueFranklin Jun 28, 2026
03cb590
fix(rocksdb): keep db ownership compatible with rocksdb 8
yan-pi Jul 5, 2026
16bf631
fix(build): require cxx17 on core targets
yan-pi Jul 5, 2026
4494bb8
build(nix): pin rocksdb 8.9.1
yan-pi Jul 5, 2026
2ce8308
build(deps): support pinned rocksdb for native macos
yan-pi Jul 5, 2026
79b182c
ci: add github actions build checks
yan-pi Jul 5, 2026
f9d53a1
ci: remove legacy circleci and travis configs
yan-pi Jul 6, 2026
56342a8
ci: add gtest, integrity, benchmarks, and increase cores
yan-pi Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .circleci/build_ubuntu_cpp.sh

This file was deleted.

4 changes: 0 additions & 4 deletions .circleci/build_ubuntu_python.sh

This file was deleted.

12 changes: 0 additions & 12 deletions .circleci/compile_ubuntu_cpp.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .circleci/compile_ubuntu_python.sh

This file was deleted.

72 changes: 0 additions & 72 deletions .circleci/config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .circleci/test_parser.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .circleci/test_python.sh

This file was deleted.

11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
release
install
build
result
**/.nix-install
**/.nix-pip
**/__pycache__
**/*.egg-info
**/*.so
**/*.dylib
**/dist
231 changes: 231 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
name: CI

on:
pull_request:
push:
branches:
- main
- master
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
nix-build:
name: Nix BTC checks
runs-on: ubuntu-24.04
timeout-minutes: 120

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
experimental-features = nix-command flakes
accept-flake-config = true

- name: Run flake checks
run: nix flake check -L --cores 2 --max-jobs 1

native-linux:
name: Native Linux build
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
PREFIX: ${{ github.workspace }}/install

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential ca-certificates cmake git ninja-build pkg-config \
libboost-all-dev libssl-dev librocksdb-dev libsparsehash-dev \
libsecp256k1-dev librange-v3-dev nlohmann-json3-dev libcereal-dev \
libgtest-dev libcurl4-openssl-dev libjsoncpp-dev \
python3 python3-dev python3-pip python3-venv

- name: Build unpackaged dependencies
run: ./scripts/install-unpackaged-deps.sh "$PREFIX"

- name: Build and install C++ targets
run: |
cmake -S . -B release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH="$PREFIX"
cmake --build release --parallel 2
cmake --install release

- name: Run C++ unit tests
run: |
cmake --build release --target blocksci_unittest --parallel 2
release/test/blocksci/blocksci_unittest /tmp/blocksci-test-config.json

- name: Parse BTC regtest fixture
run: |
export PATH="$PREFIX/bin:$PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:${LD_LIBRARY_PATH:-}"
blocksci_parser /tmp/btc-ci.json generate-config \
bitcoin_regtest /tmp/btc-ci-data \
--disk test/files/btc/regtest/ \
--max-block 100
blocksci_parser /tmp/btc-ci.json update
blocksci_parser /tmp/btc-ci.json generate-config \
bitcoin_regtest /tmp/btc-ci-data \
--disk test/files/btc/regtest/
blocksci_parser /tmp/btc-ci.json update

- name: Run integrity check
run: |
export PATH="$PREFIX/bin:$PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:${LD_LIBRARY_PATH:-}"
blocksci_check_integrity /tmp/btc-ci.json

- name: Build Python bindings
run: |
python3 -m venv "$PREFIX/venv"
"$PREFIX/venv/bin/python" -m pip install --upgrade pip setuptools wheel
CMAKE_PREFIX_PATH="$PREFIX" \
CMAKE_BUILD_PARALLEL_LEVEL=2 \
"$PREFIX/venv/bin/python" -m pip install ./blockscipy

- name: Smoke test native Linux build
run: |
export PATH="$PREFIX/bin:$PREFIX/venv/bin:$PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:${LD_LIBRARY_PATH:-}"
blocksci_parser --help >/dev/null
python -c 'import blocksci; print(blocksci.VERSION)'

native-macos:
name: Native macOS arm64 build
runs-on: macos-15
timeout-minutes: 120
env:
PREFIX: ${{ github.workspace }}/install
BLOCKSCI_BUILD_ROCKSDB: "1"
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install system dependencies
run: |
brew install \
cmake ninja git boost openssl google-sparsehash secp256k1 \
range-v3 nlohmann-json cereal googletest curl jsoncpp \
bzip2 lz4 snappy zstd

- name: Build unpackaged and pinned dependencies
run: ./scripts/install-unpackaged-deps.sh "$PREFIX"

- name: Build and install C++ targets
run: |
brew_prefix="$(brew --prefix)"
openssl_prefix="$(brew --prefix openssl)"
cmake -S . -B release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH="$PREFIX;$brew_prefix" \
-DOPENSSL_ROOT_DIR="$openssl_prefix"
cmake --build release --parallel 2
cmake --install release

- name: Build Python bindings
run: |
brew_prefix="$(brew --prefix)"
openssl_prefix="$(brew --prefix openssl)"
python3 -m venv "$PREFIX/venv"
"$PREFIX/venv/bin/python" -m pip install --upgrade \
pip setuptools wheel scikit-build-core pybind11
pybind11_dir="$("$PREFIX/venv/bin/python" -c 'import pybind11; print(pybind11.get_cmake_dir())')"
test -f "$PREFIX/lib/cmake/blocksci/blocksci-config.cmake"
test -f "$pybind11_dir/pybind11Config.cmake"
CMAKE_BUILD_PARALLEL_LEVEL=2 \
"$PREFIX/venv/bin/python" -m pip install -v --no-build-isolation ./blockscipy \
--config-settings=cmake.define.CMAKE_PREFIX_PATH="$PREFIX;$brew_prefix;$pybind11_dir" \
--config-settings=cmake.define.blocksci_DIR="$PREFIX/lib/cmake/blocksci" \
--config-settings=cmake.define.pybind11_DIR="$pybind11_dir" \
--config-settings=cmake.define.OPENSSL_ROOT_DIR="$openssl_prefix" \
--config-settings=build.verbose=true

- name: Smoke test native macOS build
run: |
export PATH="$PREFIX/bin:$PREFIX/venv/bin:$PATH"
export DYLD_LIBRARY_PATH="$PREFIX/lib:${DYLD_LIBRARY_PATH:-}"
blocksci_parser --help >/dev/null
python -c 'import blocksci; print(blocksci.VERSION)'

benchmark:
name: BTC benchmarks
runs-on: ubuntu-24.04
timeout-minutes: 120
env:
PREFIX: ${{ github.workspace }}/install

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential ca-certificates cmake git ninja-build pkg-config \
libboost-all-dev libssl-dev librocksdb-dev libsparsehash-dev \
libsecp256k1-dev librange-v3-dev nlohmann-json3-dev libcereal-dev \
libgtest-dev libcurl4-openssl-dev libjsoncpp-dev \
python3 python3-dev python3-pip python3-venv

- name: Build unpackaged dependencies
run: ./scripts/install-unpackaged-deps.sh "$PREFIX"

- name: Build and install C++ targets
run: |
cmake -S . -B release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH="$PREFIX"
cmake --build release --parallel 2
cmake --install release

- name: Build Python bindings
run: |
python3 -m venv "$PREFIX/venv"
"$PREFIX/venv/bin/python" -m pip install --upgrade \
pip setuptools wheel pytest pytest-benchmark pytest-regtest pytz tzlocal
CMAKE_PREFIX_PATH="$PREFIX" \
CMAKE_BUILD_PARALLEL_LEVEL=2 \
"$PREFIX/venv/bin/python" -m pip install ./blockscipy

- name: Run benchmarks (functional)
run: |
export PATH="$PREFIX/bin:$PREFIX/venv/bin:$PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:${LD_LIBRARY_PATH:-}"
cd test/benchmark
python -m pytest --btc -q --benchmark-disable

- name: Upload benchmark data
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-data
path: test/benchmark/.benchmarks/
if-no-files-found: ignore
Loading
Loading