1
0
Fork 0
forked from lthn/blockchain
Secure. Scalable. Easy to Use
Find a file
2025-10-10 11:03:51 +00:00
.github Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
.idea Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
cmake Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
contrib Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
docs@5f842e0538 Update docs 2025-10-09 15:38:58 +01:00
resources Replace image with rounded shape 2023-01-18 15:13:49 +01:00
snap snap: fixed run on strict confinement (#213) 2020-09-05 22:23:02 +02:00
src Update src/api/controller/RootController.hpp 2025-10-09 23:46:58 +01:00
tests Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
utils Build Simplification (#24) 2025-10-06 22:38:29 +01:00
.clang-format disabled aliases registration fee checks for testnet 2022-12-16 15:38:49 +01:00
.dockerignore Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
.gitattributes Moved sources to public repo 2018-12-27 18:50:45 +03:00
.gitignore Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
.gitmodules Dev 12 documentation overhaul (#13) 2025-09-25 16:04:33 +01:00
CMakeLists.txt Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
CMakePresets.json Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
conanfile.py Add initial Oatpp-based API server implementation 2025-10-09 13:44:34 +01:00
ConanPresets.json Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
docker-compose.yml Testnet updates (#22) 2025-10-05 14:00:36 +01:00
LICENSE.txt Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
Makefile Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
README.md Update README with build and packaging instructions 2025-10-10 12:03:46 +01:00

Discord

Dependencies

component / version minimum
(not recommended but may work)
recommended most recent of what we have ever tested
gcc (Linux) 8.4.0 9.4.0 12.3.0
llvm/clang (Linux) UNKNOWN 7.0.1 8.0.0
MSVC (Windows) 2017 (15.9.30) 2022 (17.11.5) 2022 (17.12.3)
XCode (macOS) 12.3 14.3 15.2
CMake 3.26.3 3.26.3 3.31.6

Cloning

Be sure to clone the repository properly, with --recursive flag, or you'll get angry: git clone --recursive https://github.com/letheanVPN/blockchain.git

Building


The project uses a Makefile that provides a simple and powerful interface for building. It automatically handles dependency installation with Conan and compilation with CMake.

For most use cases, these two commands are all you need. They handle the entire build process from start to finish.

  • Build for Mainnet:

    make mainnet
    
  • Build for Testnet:

    make testnet
    

Custom Builds

You can use the make build target with variables for more control over the final binaries.

Creating Release Packages

To create distributable packages (e.g., .zip, .msi, .pkg, .deb), run the release target. This will build the project, build the documentation, and then package everything.

make release TESTNET=1

The final packages will be located in the build/packages/ directory

Advanced Build Customization (Makefile Variables)

For advanced use cases, you can override variables in the Makefile to customize the build process.

  • Build a testnet version:
    make build TESTNET=1
    
  • Build a statically-linked version:
    make build STATIC=1
    
  • Build a Debug build with 8 compile threads:
    make build BUILD_TYPE=Debug CPU_CORES=8
    
  • Use custom CMakePresets:
    make build PRESET_CONFIGURE=my-config-preset PRESET_BUILD=my-build-preset
    
Variable Description Default Value
BUILD_TYPE Sets the build configuration (e.g., Release, Debug). Release
TESTNET Set to 1 to build for the test network. 0
STATIC Set to 1 to link libraries statically. 0
CPU_CORES Number of CPU cores to use for parallel compilation. Auto-detected
BUILD_VERSION The version string to embed in the binaries. 6.0.1
BUILD_FOLDER The output directory for the build. build/release
PRESET_CONFIGURE The CMake preset to use for the configure step. conan-release
PRESET_BUILD The CMake preset to use for the build step. conan-release
CONAN_CACHE The path for the local Conan cache, where the dependencies are stored. ./build/sdk
CONAN_EXECUTABLE The path to the usable Conan executable. ./build/bin/conan
CONAN_URL The URL for the Conan remote repository. artifacts.host.uk.com
CONAN_USER The username for the Conan remote. public
CONAN_PASSWORD The password for the Conan remote.

Cleaning the Build Directory

You can nuke the build directory with make clean-build

To completely reset the build directory to its cached warm-up state, run make clean; the selective clean script can be edited here: cmake/CleanBuild.cmake