Lean Ethereum consensus client for devnets, implemented in modern C++.
qlean-mini follows the Lean Ethereum devnet specification:
This repository builds a small, modular node binary called qlean and a set of loadable modules. It uses CMake, Ninja, and vcpkg (manifest mode) for dependency management.
git clone https://github.com/qdrvm/qlean-mini.git
cd qlean-miniPrerequisites:
- CMake ≥ 3.25
- Ninja
- A C++23-capable compiler (AppleClang/Clang/GCC)
- Python 3 (required by the CMake build)
- vcpkg (manifest mode)
Note: Dependencies are also listed in the .ci/.env file for both macOS and Linux. To install on Debian Linux:
source .ci/.env
sudo apt update && sudo apt install -y $(echo $LINUX_PACKAGES)Make sure gcc-$GCC_VERSION is default compiler (where GCC_VERSION is defined in .ci/.env):
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$GCC_VERSION 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION 100For macOS:
source .ci/.env
brew install $(echo $MACOS_PACKAGES)# Clone vcpkg somewhere on your machine (e.g. in your home directory)
git clone https://github.com/microsoft/vcpkg.git "$HOME/vcpkg"
# Bootstrap vcpkg
"$HOME/vcpkg"/bootstrap-vcpkg.sh
# Export VCPKG_ROOT for the current shell session (and add to ~/.zshrc if use zsh for convenience)
export VCPKG_ROOT="$HOME/vcpkg"Notes:
- This project uses vcpkg in manifest mode with custom overlay ports from
vcpkg-overlay/and the registry settings invcpkg-configuration.json. - CMake presets expect
CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake.
Use the provided CMake preset (generator: Ninja):
# From the repository root
cmake --preset default
cmake --build build -jYou can also build the project's Docker images (builder + runtime) with:
make docker_build_allSee the Makefile for more Docker targets.
This will:
- Configure the project into
./build/ - Build the main node executable at
./build/src/executable/qlean
Print help:
./build/src/executable/qlean --helpFor step-by-step instructions to run a local single-node devnet, see example/0-single/README.md. It includes the exact CLI command and an explanation of all flags.
The binary includes a helper subcommand to generate a node key and corresponding PeerId:
./build/src/executable/qlean key generate-node-keyThis prints two lines:
- The private key (hex)
- The PeerId (base58)
If TESTING is enabled (default ON in top-level CMakeLists), tests are built and can be run with CTest:
# After building
ctest --test-dir build --output-on-failureIndividual test binaries are placed under build/test_bin/.
SPDX-License-Identifier: Apache-2.0 — Copyright Quadrivium LLC