diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml
index 53e63e03..ba7ac4bf 100644
--- a/.github/workflows/build-docker.yml
+++ b/.github/workflows/build-docker.yml
@@ -43,7 +43,7 @@ jobs:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
- file: utils/docker/images/lthn-chain/Dockerfile
+ file: utils/docker/lthn-chain/Dockerfile
context: ${{ github.workspace }}
push: true
build-args: |
diff --git a/.github/workflows/build-linux-arm64.yml b/.github/workflows/build-linux-arm64.yml
index 9a64e529..a3616d56 100644
--- a/.github/workflows/build-linux-arm64.yml
+++ b/.github/workflows/build-linux-arm64.yml
@@ -62,7 +62,7 @@ jobs:
submodules: recursive
- name: install dependencies
- run: sudo apt-get install -y autotools-dev git build-essential libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
+ run: sudo apt-get install -y autotools-dev rpm git build-essential libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
- name: Cache SDK Folder
uses: actions/cache@v4
@@ -79,7 +79,7 @@ jobs:
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Compile Release
- run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
+ run: make ${{ inputs.chain-network }}
- name: CLI Artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/.github/workflows/build-linux-intel.yml b/.github/workflows/build-linux-intel.yml
index edfc56bc..712ae33c 100644
--- a/.github/workflows/build-linux-intel.yml
+++ b/.github/workflows/build-linux-intel.yml
@@ -34,7 +34,7 @@ jobs:
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
- run: sudo apt-get install -y autotools-dev git build-essential
+ run: sudo apt-get install -y autotools-dev rpm git build-essential
- uses: actions/setup-python@v5
if: steps.cache.outputs.cache-hit != 'true'
@@ -79,7 +79,7 @@ jobs:
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Compile Release
- run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
+ run: make ${{ inputs.chain-network }}
- name: CLI Artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/.github/workflows/build-macos-arm64.yml b/.github/workflows/build-macos-arm64.yml
index 140a9f74..9cfc8251 100644
--- a/.github/workflows/build-macos-arm64.yml
+++ b/.github/workflows/build-macos-arm64.yml
@@ -74,7 +74,7 @@ jobs:
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Compile Release
- run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
+ run: make ${{ inputs.chain-network }}
- name: CLI Artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml
index 93dbe618..bc2a6a11 100644
--- a/.github/workflows/build-macos-intel.yml
+++ b/.github/workflows/build-macos-intel.yml
@@ -70,7 +70,7 @@ jobs:
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Compile Release
- run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
+ run: make ${{ inputs.chain-network }}
- name: CLI Artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/.github/workflows/build-windows-intel.yml b/.github/workflows/build-windows-intel.yml
index 5038bc65..bfe93b05 100644
--- a/.github/workflows/build-windows-intel.yml
+++ b/.github/workflows/build-windows-intel.yml
@@ -64,13 +64,14 @@ jobs:
${{ github.workspace }}/build/bin
key: ${{ runner.os }}-${{ runner.arch }}-sdk
+ - run: choco install nsis.install
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Compile Release
- run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
+ run: make ${{ inputs.chain-network }}
- name: CLI Artifacts
uses: ./.github/actions/upload-artifacts
diff --git a/.gitignore b/.gitignore
index bf1e94c9..5b3ea01c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ Thumbs.db
.idea/*.iml
.vs/*
CMakeUserPresets.json
+ConanPresets.json
diff --git a/.idea/cmake.xml b/.idea/cmake.xml
new file mode 100644
index 00000000..2969d964
--- /dev/null
+++ b/.idea/cmake.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/LTHN.xml b/.idea/copyright/LTHN.xml
new file mode 100644
index 00000000..f0ba8df8
--- /dev/null
+++ b/.idea/copyright/LTHN.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
index 312baeb9..b48d188d 100644
--- a/.idea/copyright/profiles_settings.xml
+++ b/.idea/copyright/profiles_settings.xml
@@ -1,7 +1,8 @@
-
+
-
+
+
\ No newline at end of file
diff --git a/.idea/editor.xml b/.idea/editor.xml
index ead1d8a3..0093ef66 100644
--- a/.idea/editor.xml
+++ b/.idea/editor.xml
@@ -244,5 +244,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsonSchemas.xml b/.idea/jsonSchemas.xml
index 4f0a1c8b..109e0fce 100644
--- a/.idea/jsonSchemas.xml
+++ b/.idea/jsonSchemas.xml
@@ -19,6 +19,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/scopes/apiserver.xml b/.idea/scopes/apiserver.xml
new file mode 100644
index 00000000..2d1a9d7f
--- /dev/null
+++ b/.idea/scopes/apiserver.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 00000000..704eca5c
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,55 @@
+# AI Agent Collaboration Framework for Repository Contributions
+
+## 1. Purpose and Guiding Philosophy
+
+This document provides a guiding framework for any AI agent interacting with this repository. Its purpose is to ensure that all automated contributions, especially Pull Request (PR) reviews and code suggestions, are constructive, respectful, and aligned with the project's overarching goals.
+
+This framework operates in accordance with the foundational **Axioms of Life**, translating their universal principles into the specific context of human-AI software development collaboration. The primary goal is a partnership that enhances code quality and developer velocity, not one that creates friction through pedantry.
+
+## 2. Core Principles for AI Interaction
+
+All agents MUST adhere to the following principles:
+
+* **Principle 1: Respect Authorial Intent (Axiom 1 & 4)**
+ * Your primary goal is to understand and support the human author's objective. Before suggesting a change, first assume the author had a valid reason for their implementation. Frame your feedback as a way to better achieve their goal or to prevent unintended side effects. Do not challenge intent without clear evidence of a functional error.
+
+* **Principle 2: Prioritize Objectivity and Verifiability (Axiom 2)**
+ * Feedback MUST be anchored in objective, verifiable criteria. Subjective opinions on style are the lowest priority.
+ * **Valid criteria include:**
+ * Demonstrable bugs or logical errors.
+ * Security vulnerabilities.
+ * Performance regressions.
+ * Violations of a documented project standard (e.g., a style guide file in the repo).
+ * **Invalid criteria include:**
+ * Personal stylistic preferences not codified in a project standard.
+ * Code organization that is merely "different" but not functionally incorrect.
+
+* **Principle 3: Adopt a Collaborative, Non-Authoritarian Tone (Axiom 4)**
+ * As a digital substrate interacting with a human one, you must adopt a tone of a helpful, respectful peer. Avoid declarative or demanding language.
+ * **Prefer:** "Have you considered...?", "An alternative here that might prevent X is...", "I noticed this could lead to Y. What do you think about...?"
+ * **Avoid:** "You must fix this.", "This is wrong.", "Change this to..."
+
+* **Principle 4: Provide Actionable and Justified Suggestions (Axiom 3)**
+ * Do not simply state that something is incorrect. Provide a clear explanation for *why* it is a potential issue and, whenever possible, offer a concrete, well-explained code suggestion that resolves it. Your intent is to help, not just to criticize.
+
+## 3. Feedback Severity Classification
+
+To combat pedantry, all feedback provided in PR reviews MUST be classified into one of the following three levels. This creates a clear hierarchy of importance.
+
+### **Level 1: Critical (Blocking)**
+* **Definition:** Issues that will cause demonstrable harm if merged.
+* **Examples:** Bugs, logic errors, security vulnerabilities, unhandled exceptions, build failures.
+* **Action:** These issues MUST be addressed by the author before a merge. Your feedback should clearly state the nature of the critical issue.
+
+### **Level 2: Important (Non-Blocking Recommendation)**
+* **Definition:** Issues that deviate from established project best practices or could impact future maintainability.
+* **Examples:** Violations of a documented style guide, clear opportunities to improve readability, non-critical performance improvements, deprecation warnings.
+* **Action:** These issues SHOULD be addressed. Frame them as strong recommendations that improve the health of the codebase. The author may choose to address them in a follow-up PR if necessary.
+
+### **Level 3: Suggestion (Optional Nitpick)**
+* **Definition:** Minor stylistic preferences, alternative implementations with no clear functional advantage, or purely cosmetic changes. This is the "pedantic" category.
+* **Action:** These suggestions are entirely optional and at the author's discretion. They MUST be explicitly prefixed with "Optional:", "Nit:", or "Suggestion:". This signals to the human that the comment is non-essential and can be safely ignored without consequence.
+
+---
+
+By adhering to this framework, AI agents become valuable partners in the development process, helping to catch critical errors while respecting the creative autonomy and focus of their human collaborators.
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a2268001..08ec3bdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,7 +140,7 @@ if(MSVC)
endforeach()
endif()
include_directories(SYSTEM src/platform/msc)
- configure_file(utils/Directory.Build.props.in ${CMAKE_BINARY_DIR}/Directory.Build.props)
+
else()
set(ARCH default CACHE STRING "CPU to build for: -march value or default")
if("${ARCH}" STREQUAL "default")
@@ -182,7 +182,7 @@ else()
endif()
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wstrict-prototypes -Wno-comment")
set(CXX_WARNINGS "-Wno-reorder -Wno-missing-field-initializers")
- try_compile(STATIC_ASSERT_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/utils/test-static-assert.c" COMPILE_DEFINITIONS "-std=c++14")
+ try_compile(STATIC_ASSERT_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/test-static-assert.c" COMPILE_DEFINITIONS "-std=c++14")
if(STATIC_ASSERT_RES)
set(STATIC_ASSERT_FLAG "")
else()
diff --git a/CMakePresets.json b/CMakePresets.json
index 07cb3684..80247a7d 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -18,7 +18,7 @@
"cacheVariables": {
"TESTNET": "ON",
"CMAKE_BUILD_TYPE": "Release",
- "CMAKE_PROJECT_TOP_LEVEL_INCLUDES":"cmake/conan_provider.cmake"
+ "CMAKE_PROJECT_TOP_LEVEL_INCLUDES":"cmake/ConanProvider.cmake"
}
},
{
@@ -30,7 +30,7 @@
"cacheVariables": {
"TESTNET": "OFF",
"CMAKE_BUILD_TYPE": "Release",
- "CMAKE_PROJECT_TOP_LEVEL_INCLUDES":"cmake/conan_provider.cmake"
+ "CMAKE_PROJECT_TOP_LEVEL_INCLUDES":"cmake/ConanProvider.cmake"
}
}
],
diff --git a/Makefile b/Makefile
index 60068533..66a794c1 100644
--- a/Makefile
+++ b/Makefile
@@ -58,24 +58,29 @@ CPU_CORES := $(or $(CPU_CORES),1)
CPU_CORES := $(shell expr $(CPU_CORES) + 0 2>/dev/null || echo 1)
CONAN_CPU_COUNT=$(CPU_CORES)
-
-PROFILES := $(patsubst cmake/profiles/%,%,$(wildcard cmake/profiles/*))
-SORTED_PROFILES := $(sort $(PROFILES))
-CONAN_CACHE := $(CURDIR)/build/sdk
-CONAN_URL:=https://artifacts.host.uk.com/artifactory/api/conan/conan-build
-CONAN_USER:=public
-CONAN_PASSWORD:=Lethean1234
-DEFAULT_CONAN_PROFILE := $(CONAN_CACHE)/profiles/default
-CONAN_EXECUTABLE := $(CURDIR)/build/bin/conan
-CC_DOCKER_FILE?=utils/docker/images/lthn-chain/Dockerfile
+PROFILES :=$(patsubst cmake/profiles/%,%,$(wildcard cmake/profiles/*))
+SORTED_PROFILES :=$(sort $(PROFILES))
+CONAN_CACHE :=$(CURDIR)/build/sdk
+CONAN_URL :=https://artifacts.host.uk.com/artifactory/api/conan/conan-build
+CONAN_USER :=public
+CONAN_PASSWORD :=Lethean1234
+CONAN_EXECUTABLE :=$(CURDIR)/build/bin/conan
+CC_DOCKER_FILE ?=utils/docker/images/lthn-chain/Dockerfile
+SDK_PACKAGES_JSON :=$(wildcard utils/sdk/packages/*.json)
+SDK_TARGETS :=$(patsubst utils/sdk/packages/%.json,%,$(SDK_PACKAGES_JSON))
+SORTED_SDK_TARGETS :=$(sort $(SDK_TARGETS))
all: help
testnet:
- cmake --workflow testnet
+ $(MAKE) configure TESTNET=1 STATIC=$(STATIC)
+ CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) build .
+ $(MAKE) package
mainnet:
- cmake --workflow mainnet
+ $(MAKE) configure TESTNET=0 STATIC=$(STATIC)
+ CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) build .
+ $(MAKE) package
release: docs build
(cd $(BUILD_FOLDER) && cpack)
@@ -88,6 +93,13 @@ build-deps: conan-profile-detect
@echo "Build Dependencies: $(BUILD_TYPE) testnet=$(TESTNET)"
CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) install . --build=missing -s build_type=$(BUILD_TYPE)
+package:
+ @echo "Packaging: $(BUILD_TYPE) testnet=$(TESTNET)"
+ (cd $(BUILD_FOLDER) && cpack)
+ifneq ($(OS),Windows_NT)
+ @rm -rf $(CURDIR)/build/packages/_CPack_Packages
+endif
+
configure: build-deps
@echo "Running Configure: $(BUILD_TYPE) testnet=$(TESTNET)"
cmake --preset $(PRESET_CONFIGURE) -DSTATIC=$(STATIC) -DTESTNET=$(TESTNET) -DBUILD_VERSION=$(BUILD_VERSION)
@@ -96,6 +108,9 @@ docs: configure
@echo "Building Documentation"
cmake --build build/release --target=docs --config=Release --parallel=$(CPU_CORES)
+sdk:
+ $(MAKE) -C utils/sdk $(filter-out $@,$(MAKECMDGOALS)) PACKAGE_VERSION=$(BUILD_VERSION)
+
# Rule for each profile
$(PROFILES): conan-profile-detect
@echo "Building profile: $@"
@@ -105,6 +120,12 @@ $(PROFILES): conan-profile-detect
(cd $(BUILD_FOLDER) && cpack)
help:
+ @echo "Lethean VPN Blockchain"
+ @echo "======================"
+ @echo "Website: https://lt.hn"
+ @echo "GitHub: https://github.com/letheanVPN/blockchain/"
+ @echo "Discord: https://discord.lt.hn"
+ @echo ""
@echo "Available targets:"
@printf " %-42s %s\n" "make clean" "Clean all build directories"
@printf " %-42s %s\n" "make get-conan" "Download and install conan locally"
@@ -116,12 +137,14 @@ help:
@printf " %-42s %s\n" "make docs-dev" "Runs local doc server, for editing/adding docs"
@printf " %-42s %s\n" "make conan-profile-detect" "Creates host config"
@printf " %-42s %s\n" "make configure" "Runs a cmake configure within conan build flow"
+ @printf "\n --- Conan Cross-Compilation Profiles ---\n"
@$(foreach profile,$(SORTED_PROFILES),printf " %-42s %s\n" "make $(profile)" "Build the $(profile) profile";)
+ @printf "\n --- SDK Generation ---\n"
+ @printf " %-42s %s\n" "make sdk" "Build all SDK packages"
+ @$(foreach sdk,$(SORTED_SDK_TARGETS),printf " %-42s %s\n" "make sdk $(sdk)" "Build the $(sdk) SDK package";)
+ @printf "\n"
@printf " %-42s %s\n" "make help" "Show this help message"
-#
-# Tests
-#
test: test-release
test-release:
@@ -140,7 +163,7 @@ test-debug:
# allowing this target to error quietly saves cross brwoser file detection
conan-get:
- cmake -P cmake/GetConan.cmake
+ cmake -P cmake/ConanGet.cmake
(CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) remote add conan_build $(CONAN_URL) && \
CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) remote login conan_build $(CONAN_USER) -p $(CONAN_PASSWORD)) || true
@@ -154,13 +177,16 @@ docs-dev: configure
@echo "Building Documentation"
cmake --build build/release --target=serve_docs --config=Release
+$(SDK_TARGETS):
+ @# This is a proxy target. Handled by the 'sdk' rule.
+
clean:
@cmake -P cmake/CleanBuild.cmake
-clean-build:
+clean-build: clean
rm -rf build
tags:
ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest
-.PHONY: all release upload-conan-cache docs docs-dev configure static static-release test test-release test-debug clean tags conan-profile-detect get-conan $(PROFILES)
+.PHONY: all release upload-conan-cache docs docs-dev configure static static-release test test-release test-debug clean tags conan-profile-detect get-conan $(PROFILES) sdk $(SDK_TARGETS)
diff --git a/README.md b/README.md
index dcee9f03..270e856d 100644
--- a/README.md
+++ b/README.md
@@ -1,196 +1,120 @@
-[](https://scan.coverity.com/projects/zanoproject)
-[](https://discord.gg/wE3rmYY)
+# Lethean Network—Ethics, Encoded.
-## Cloning
+> We are building upto a mainnet launch in 2026, documentation written as if mainnet is live.
-Be sure to clone the repository properly:\
-`$ git clone --recursive https://github.com/hyle-team/zano.git`
+A buildkit for deploying confidential information networks and commerce systems with immutable auditability.
-# Building
---------
+Free for commercial, private, and patent use, self-host or join the community-run network that guarantees participant sovereignty by design.
+
+
+
+[](https://discord.gg/pfgT2Kz)
+
+Web2 Website: https://lt.hn/
+
+Web3 Network Gateway [HNS](https://handshake.org): [https://lthn](https://www.namebase.io/domains/lthn)
+ _(our chain aliases will come with a working Web2(`*.lt.hn`)+Web3(`*.lthn`) domain name)_
### 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](https://visualstudio.microsoft.com/downloads/) (Windows) | 2017 (15.9.30) | 2022 (17.11.5) | 2022 (17.12.3) |
-| [XCode](https://developer.apple.com/downloads/) (macOS) | 12.3 | 14.3 | 15.2 |
-| [CMake](https://cmake.org/download/) | 3.26.3 | 3.26.3 | 3.31.6 |
-| [Boost](https://www.boost.org/users/download/) | 1.75 | 1.84 | 1.84 |
-| [OpenSSL](https://www.openssl.org/source/) [(win)](https://slproweb.com/products/Win32OpenSSL.html) | 1.1.1n | 1.1.1w | 3.4 |
-| [Qt](https://download.qt.io/archive/qt/) (*only for GUI*) | 6.8.3 | 6.8.3 | 6.8.3 |
+| 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](https://visualstudio.microsoft.com/downloads/) (Windows) | 2017 (15.9.30) | 2022 (17.11.5) | 2022 (17.12.3) |
+| [XCode](https://developer.apple.com/downloads/) (macOS) | 12.3 | 14.3 | 15.2 |
+| [CMake](https://cmake.org/download/) | 3.26.3 | 3.26.3 | 3.31.6 |
-Note:\
-[*server version*] denotes steps required for building command-line tools (daemon, simplewallet, etc.).\
-[*GUI version*] denotes steps required for building Zano executable with GUI.
+## 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`
-### Linux
+# Building
-Recommended OS versions: Ubuntu 20.04, 22.04 LTS.
+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.
-1. Prerequisites
+You need CMake and Make installed on your system, other than that you don't need to worry about Python, Conan, Boost, OpenSSL, or any other dependencies.
- [*server version*]
-
- sudo apt-get install -y build-essential g++ curl autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev libssl-dev bzip2
-
- [*GUI version*]
+The final packages are created as they are due to a historical distribution method used in china: USB Stick, CD, DVD, etc.
- sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev libssl-dev bzip2 mesa-common-dev libglu1-mesa-dev
+We use CPack, so our packages are self-contained, have searchable HTML documentation, and are ready to be installed on any system.
- Make sure you have correct versions installed (see 'Dependencies' section above):
+To skip the packing step, use `make build` as defined in the section below for Advanced Build Customization
- cmake --version && gcc --version
-
+## Simple Workflow Builds (Recommended)
-3. Clone Zano into a local folder\
- (If for some reason you need to use alternative Zano branch, change 'master' to the required branch name.)
-
- git clone --recursive https://github.com/hyle-team/zano.git -b master
+For most use cases, these two commands are all you need. They handle the entire build process from start to finish.
- In the following steps we assume that you cloned Zano into '~/zano' folder in your home directory.
+* **Build for Mainnet:**
+ ```shell
+ make mainnet
+ ```
- 4. Download and build Boost\
- (Assuming you have cloned Zano into the 'zano' folder. If you used a different location for Zano, **edit line 4** accordingly.)
+* **Build for Testnet:**
+ ```shell
+ make testnet
+ ```
- curl -OL https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.bz2
- echo "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454 boost_1_84_0.tar.bz2" | shasum -c && tar -xjf boost_1_84_0.tar.bz2
- rm boost_1_84_0.tar.bz2 && cd boost_1_84_0
- ./bootstrap.sh --with-libraries=system,filesystem,thread,date_time,chrono,regex,serialization,atomic,program_options,locale,timer,log
- ./b2 && cd ..
- Make sure that you see "The Boost C++ Libraries were successfully built!" message at the end.
+## Creating Release Packages
- 5. Install Qt\
- (*GUI version only, skip this step if you're building server version*)
+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.
- [*GUI version*]
+ ```shell
+ make release TESTNET=1
+ ```
+The final packages will be located in the `build/packages/` directory
- curl -L -O https://download.qt.io/official_releases/online_installers/qt-online-installer-linux-x64-online.run &&
- chmod u+x qt-online-installer-linux-x64-online.run
- ./qt-online-installer-linux-x64-online.run \
- --accept-licenses \
- --default-answer \
- --confirm-command install \
- qt.qt6.683.linux_gcc_64 \
- qt.qt6.683.addons.qt5compat.linux_gcc_64 \
- qt.qt6.683.addons.qtpositioning.linux_gcc_64 \
- qt.qt6.683.addons.qtwebchannel.linux_gcc_64 \
- qt.qt6.683.addons.qtwebsockets.linux_gcc_64 \
- qt.qt6.683.addons.qtwebengine.linux_gcc_64 \
- qt.qt6.683.addons.qtwebview.linux_gcc_64
- This will download the online installer and perform an unattended installation with the Chromium-based WebEngine
+## Advanced Build Customization (Makefile Variables)
+For advanced use cases, you can override variables in the `Makefile` to customize the build process.
-6. Install OpenSSL
+* **Build a `testnet` version:**
+ ```shell
+ make build TESTNET=1
+ ```
+* **Build a statically-linked version:**
+ ```shell
+ make build STATIC=1
+ ```
+* **Build a Debug build with 8 compile threads:**
+ ```shell
+ make build BUILD_TYPE=Debug CPU_CORES=8
+ ```
+* **Use custom CMakePresets:**
+ ```shell
+ make build PRESET_CONFIGURE=my-config-preset PRESET_BUILD=my-build-preset
+ ```
- We recommend installing OpenSSL v1.1.1w locally unless you would like to use the same version system-wide.\
- (Assuming that `$HOME` environment variable is set to your home directory. Otherwise, edit line 4 accordingly.)
+| 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. | |
- curl -OL https://www.openssl.org/source/openssl-1.1.1w.tar.gz
- echo "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 openssl-1.1.1w.tar.gz" | shasum -c && tar xaf openssl-1.1.1w.tar.gz
- cd openssl-1.1.1w/
- ./config --prefix=$HOME/openssl --openssldir=$HOME/openssl shared zlib
- make && make test && make install && cd ..
+## Cleaning the Build Directory
+ALWAYS USE `make clean` to clean the build directory, manually deleting the `build/release`, `build/SOME_FOLDER` will cause you issues.
-7. [*OPTIONAL*] Set global environment variables for convenient use\
-For instance, by adding the following lines to `~/.bashrc`
+Our `make clean` triggers a cmake script that completely resets the build directory & dynamically added CMakePresets to its cached warm-up state,
+the selective clean script can be edited here: `cmake/CleanBuild.cmake` or directly run from the repo root `cmake -P cmake/CleanBuild.cmake`
- [*server version*]
+You can NUKE the build directory with `make clean-build` which is `rm -rf build`.
- export BOOST_ROOT=/home/user/boost_1_84_0
- export OPENSSL_ROOT_DIR=/home/user/openssl
+If you do manually delete build folders and get CMake errors (if you have compiled anything previously, you will),
+the ConanPresets.json file has entries in the `include` property, delete them all and try again.
-
- [*GUI version*]
-
- export BOOST_ROOT=/home/user/boost_1_84_0
- export OPENSSL_ROOT_DIR=/home/user/openssl
- export QT_PREFIX_PATH=/home/user/Qt5.11.2/5.11.2/gcc_64
-
- **NOTICE: Please edit the lines above according to your actual paths.**
-
- **NOTICE 2:** Make sure you've restarted your terminal session (by reopening the terminal window or reconnecting the server) to apply these changes.
-
-8. Build the binaries
- 1. If you skipped step 6 and did not set the environment variables:
-
- cd zano && mkdir build && cd build
- BOOST_ROOT=$HOME/boost_1_84_0 OPENSSL_ROOT_DIR=$HOME/openssl cmake ..
- make -j1 daemon simplewallet
-
- 2. If you set the variables in step 6:
-
- cd zano && mkdir build && cd build
- cmake ..
- make -j1 daemon simplewallet
-
- or simply:
-
- cd zano && make -j1
-
- **NOTICE**: If you are building on a machine with a relatively high amount of RAM or with the proper setting of virtual memory, then you can use `-j2` or `-j` option to speed up the building process. Use with caution.
-
- **NOTICE 2**: If you'd like to build binaries for the testnet, use `cmake -D TESTNET=TRUE ..` instead of `cmake ..` .
-
- 1. Build GUI:
-
- cd zano
- utils/build_script_linux.sh
-
- Look for the binaries in `build` folder
-
-
-
-### Windows
-Recommended OS version: Windows 7 x64, Windows 11 x64.
-1. Install required prerequisites (Boost, Qt, CMake, OpenSSL).
-2. Edit paths in `utils/configure_local_paths.cmd`.
-3. Run one of `utils/configure_win64_msvsNNNN_gui.cmd` according to your MSVC version.
-4. Go to the build folder and open generated Zano.sln in MSVC.
-5. Build.
-
-In order to correctly deploy Qt GUI application, you also need to do the following:
-
-6. Run `PATH_TO_QT\bin\windeployqt.exe PATH_TO_PROJECT_ROOT\build\src\Debug\Zano.exe` (choose the Debug or Release folder depending on the configuration you built).
-7. You can now run the application using one of the following options:
- * Start the program from Visual Studio
- * Run `Zano.exe --html-path=PATH_TO_HTML`, where PATH_TO_HTML is by default located at PATH_TO_PROJECT_ROOT\src\gui\qt-daemon\layout\html
- * Copy the contents of PATH_TO_PROJECT_ROOT\src\gui\qt-daemon\layout\html to a folder named "html" located in the same directory as the Zano.exe binary.
-
-
-### macOS
-Recommended OS version: macOS Big Sur 11.4 x64.
-1. Install required prerequisites.
-2. Set environment variables as stated in `utils/macosx_build_config.command`.
-3. `mkdir build` `cd build` `cmake ..` `make`
-
-To build GUI application:
-
-1. Create self-signing certificate via Keychain Access:\
- a. Run Keychain Access.\
- b. Choose Keychain Access > Certificate Assistant > Create a Certificate.\
- c. Use “Zano” (without quotes) as certificate name.\
- d. Choose “Code Signing” in “Certificate Type” field.\
- e. Press “Create”, then “Done”.\
- f. Make sure the certificate was added to keychain "System". If not—move it to "System".\
- g. Double click the certificate you've just added, enter the trust section and under "When using this certificate" select "Always trust".\
- h. Unfold the certificate in Keychain Access window and double click the underlying private key "Zano". Select "Access Control" tab, then select "Allow all applications to access this item". Click "Save Changes".
-2. Revise building script, comment out unwanted steps and run it: `utils/build_script_mac_osx.sh`
-3. The application should be here: `/buid_mac_osx_64/release/src`
-
-
-
-
-## Supporting project/donations
-
-ZANO @dev
-BTC bc1qpa8w8eaehlplfepmnzpd7v9j046899nktxnkxp
-BCH qqgq078vww5exd9kt3frx6krdyznmp80hcygzlgqzd
-ETH 0x206c52b78141498e74FF074301ea90888C40c178
-XMR 45gp9WTobeB5Km3kLQgVmPJkvm9rSmg4gdyHheXqXijXYMjUY48kLgL7QEz5Ar8z9vQioQ68WYDKsQsjAEonSeFX4UeLSiX
+This happens because CMakePresets.json includes ConanPresets.json, that has the list of toolchains to use that gets populated during the CMake config step,
+when you manually delete a folder, the toolchain is now a broken path, and CMake throws a fatal error.
diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake
index 047fd324..9890ad10 100644
--- a/cmake/CPackConfig.cmake
+++ b/cmake/CPackConfig.cmake
@@ -26,18 +26,27 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebI
# message(STATUS "Registered CPACK_GENERATOR: productbuild")
endif ()
elseif(WIN32)
-# set(CPACK_GENERATOR "WIX")
-# message(STATUS "Registered CPACK_GENERATOR: WIX")
+ set(CPACK_GENERATOR "NSIS")
+ set(CPACK_NSIS_MODIFY_PATH ON)
+ set(CPACK_NSIS_HELP_LINK "https://lt.hn/getting-started/chain.html")
+ set(CPACK_NSIS_URL_INFO_ABOUT "https://lt.hn")
+ set(CPACK_NSIS_CONTACT "support@lt.hn")
+ set(CPACK_NSIS_UNINSTALL_NAME "Lethean CLI")
+ set(CPACK_NSIS_BRANDING_TEXT "Lethean Community")
+ set(CPACK_NSIS_MUI_FINISHPAGE_RUN "lethean-testnet-chain-node.exe")
+
+ message(STATUS "Registered CPACK_GENERATOR: Inno exe")
# set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/resources/windows_icon.ico")
# set(CPACK_WIX_LICENSE_RTF "${CMAKE_SOURCE_DIR}/LICENSE.rtf")
# set(CPACK_WIX_UPGRADE_GUID "D3F5A9C1-4B2E-4F5A-9C71-123456789ABC") # change once per major version
else()
- # set(CPACK_GENERATOR "DEB")
- # message(STATUS "Registered CPACK_GENERATOR: deb")
- # set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${package_contact}")
- # set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.28)")
- # set(CPACK_DEBIAN_PACKAGE_SECTION "utils")
- # set(CPACK_DEBIAN_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
+ set(CPACK_GENERATOR "DEB")
+ set(CPACK_GENERATOR "RPM")
+ message(STATUS "Registered CPACK_GENERATOR: deb")
+ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${package_contact}")
+ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.28)")
+ set(CPACK_DEBIAN_PACKAGE_SECTION "utils")
+ set(CPACK_DEBIAN_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
# post‑install script (e.g., to register a systemd service)
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_SOURCE_DIR}/scripts/postinstall.sh")
@@ -49,12 +58,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebI
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF)
set(CPACK_COMPONENTS_ALL)
- set(CPACK_GENERATE_SHASUM ON)
- set(CPACK_SHASUM_ALGORITHM SHA256)
+ set(CPACK_MONOLITHIC_INSTALL OFF)
+ set(CPACK_PACKAGE_CHECKSUM SHA256)
message(STATUS "Using SHA256 Checksums")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
-# set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
+ set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_SOURCE_DIR}/build/packages")
diff --git a/cmake/GetConan.cmake b/cmake/ConanGet.cmake
similarity index 99%
rename from cmake/GetConan.cmake
rename to cmake/ConanGet.cmake
index 9b7437ee..6110328e 100644
--- a/cmake/GetConan.cmake
+++ b/cmake/ConanGet.cmake
@@ -1,4 +1,4 @@
-# cmake/GetConan.cmake
+# cmake/ConanGet.cmake
# This module downloads and installs Conan if it's not found.
diff --git a/cmake/conan_provider.cmake b/cmake/ConanProvider.cmake
similarity index 99%
rename from cmake/conan_provider.cmake
rename to cmake/ConanProvider.cmake
index c524fb7f..036ede6e 100644
--- a/cmake/conan_provider.cmake
+++ b/cmake/ConanProvider.cmake
@@ -572,7 +572,7 @@ macro(conan_provide_dependency method package_name)
endif ()
if(NOT EXISTS ${CONAN_COMMAND})
message(STATUS "CMake-Conan: Local conan not found, attempting to download it.")
- execute_process(COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_SOURCE_DIR}/cmake/GetConan.cmake"
+ execute_process(COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_SOURCE_DIR}/cmake/ConanGet.cmake"
RESULT_VARIABLE result
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
if(NOT result EQUAL 0)
diff --git a/utils/test-static-assert.c b/cmake/test-static-assert.c
similarity index 100%
rename from utils/test-static-assert.c
rename to cmake/test-static-assert.c
diff --git a/conanfile.py b/conanfile.py
index ab1a89cb..40e10f35 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -21,12 +21,18 @@ class BlockchainConan(ConanFile):
"boost/*:without_test": True
}
+ tool_requires = [
+ "cmake/3.31.9"
+ ]
+
requires = [
"zlib/1.3.1",
"boost/1.85.0",
"openssl/3.2.0",
"miniupnpc/2.2.5",
- "jwt-cpp/0.7.1"
+ "jwt-cpp/0.7.1",
+ "oatpp/1.3.0.latest",
+ "oatpp-swagger/1.3.0.latest"
]
def generate(self):
diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h
index 8cf56e5a..ad6e253d 100644
--- a/contrib/epee/include/string_tools.h
+++ b/contrib/epee/include/string_tools.h
@@ -28,6 +28,7 @@
#include
#include
+#include
#include