From 217e0d99c5fa91921699028eb94f699472c1b6e1 Mon Sep 17 00:00:00 2001 From: frstrtr Date: Sat, 11 Jul 2026 08:57:02 +0000 Subject: [PATCH] ltc: add c2pool-ltc release entrypoint (git mv c2pool_refactored.cpp -> main_ltc.cpp) The coin-matrix / release presence gate keys on src/c2pool/main_ltc.cpp (the real entrypoint, not src/impl/ltc/main -- see PR #66). LTC had no such file, so the ltc cell hit the presence gate, hollow-green-skipped, and produced NO pkg-*-ltc artifact -- a tagged release would ship an LTC package with no LTC binary. Fix, mirroring the sibling coins (btc/dgb/bch/dash): - git mv src/c2pool/c2pool_refactored.cpp -> src/c2pool/main_ltc.cpp (100%% rename; c2pool_refactored.cpp WAS the LTC-native main). Repoint the existing c2pool and c2pool_enhanced targets to main_ltc.cpp. - add_executable(c2pool-ltc main_ltc.cpp) with the c2pool_enhanced link set verbatim (LTC is the reference coin). DOGE aux rides via c2pool_merged_mining -- always compiled in, NO -DAUX_DOGE flag. - WIN32/MSVC parity (ws2_32/bigobj/8MB stack) so the Windows release cell links. - verify_archival.sh: repoint the active-implementation checks to main_ltc.cpp (standalone helper, not CI-wired) so it stops flagging a false MISSING (CRITICAL ERROR). Presence gate other half (src/impl/ltc/) already present. Build target name c2pool-ltc and binary path src/c2pool/c2pool-ltc match release.yml. --- scripts/verify_archival.sh | 20 ++++++------- src/c2pool/CMakeLists.txt | 29 +++++++++++++++++-- .../{c2pool_refactored.cpp => main_ltc.cpp} | 0 3 files changed, 37 insertions(+), 12 deletions(-) rename src/c2pool/{c2pool_refactored.cpp => main_ltc.cpp} (100%) diff --git a/scripts/verify_archival.sh b/scripts/verify_archival.sh index af0d3b012..6c4308597 100755 --- a/scripts/verify_archival.sh +++ b/scripts/verify_archival.sh @@ -59,10 +59,10 @@ echo # Check that refactored version is present and active echo "🚀 Checking Active Implementation..." -if [ -f "src/c2pool/c2pool_refactored.cpp" ]; then - echo "✅ c2pool_refactored.cpp - ACTIVE IMPLEMENTATION" +if [ -f "src/c2pool/main_ltc.cpp" ]; then + echo "✅ main_ltc.cpp - ACTIVE IMPLEMENTATION" else - echo "❌ c2pool_refactored.cpp - MISSING (CRITICAL ERROR)" + echo "❌ main_ltc.cpp - MISSING (CRITICAL ERROR)" fi echo @@ -71,14 +71,14 @@ echo echo "🔨 Checking Build Targets..." if [ -f "build/src/c2pool/c2pool" ]; then echo "✅ c2pool - PRIMARY EXECUTABLE BUILT" - echo " └─ Built from: c2pool_refactored.cpp" + echo " └─ Built from: main_ltc.cpp" else echo "❌ c2pool - PRIMARY EXECUTABLE NOT FOUND" fi if [ -f "build/src/c2pool/c2pool_enhanced" ]; then echo "✅ c2pool_enhanced - ENHANCED EXECUTABLE BUILT" - echo " └─ Built from: c2pool_refactored.cpp" + echo " └─ Built from: main_ltc.cpp" else echo "❌ c2pool_enhanced - ENHANCED EXECUTABLE NOT FOUND" fi @@ -131,7 +131,7 @@ echo "===================" echo archive_count=$(ls -1 archive/*.cpp 2>/dev/null | wc -l) echo "📁 Archived files: $archive_count" -echo "🚀 Active implementation: c2pool_refactored.cpp" +echo "🚀 Active implementation: main_ltc.cpp" echo "🎯 Primary executable: c2pool" echo "⭐ Enhanced executable: c2pool_enhanced" echo @@ -143,9 +143,9 @@ if [ -f "archive/c2pool_legacy.cpp" ]; then echo " Legacy c2pool.cpp: $legacy_size lines" fi -if [ -f "src/c2pool/c2pool_refactored.cpp" ]; then - refactored_size=$(wc -l < src/c2pool/c2pool_refactored.cpp) - echo " Refactored c2pool_refactored.cpp: $refactored_size lines" +if [ -f "src/c2pool/main_ltc.cpp" ]; then + refactored_size=$(wc -l < src/c2pool/main_ltc.cpp) + echo " Refactored main_ltc.cpp: $refactored_size lines" fi echo @@ -165,6 +165,6 @@ echo echo "🎉 LEGACY ARCHIVAL COMPLETE!" echo echo "All future development should use:" -echo " Source: src/c2pool/c2pool_refactored.cpp" +echo " Source: src/c2pool/main_ltc.cpp" echo " Build: make c2pool" echo " Run: ./c2pool --help" diff --git a/src/c2pool/CMakeLists.txt b/src/c2pool/CMakeLists.txt index 10663c2ed..73984b14f 100644 --- a/src/c2pool/CMakeLists.txt +++ b/src/c2pool/CMakeLists.txt @@ -103,7 +103,7 @@ endif() string(REGEX REPLACE "^v" "" C2POOL_GIT_VERSION "${C2POOL_GIT_VERSION}") # Main C2Pool Enhanced Application (refactored with mining_shares/p2p_shares separation) -add_executable(c2pool c2pool_refactored.cpp) +add_executable(c2pool main_ltc.cpp) target_compile_definitions(c2pool PRIVATE C2POOL_VERSION="${C2POOL_GIT_VERSION}") target_link_libraries(c2pool c2pool_node_enhanced @@ -122,7 +122,7 @@ target_link_libraries(c2pool target_link_libraries(c2pool c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39) # Enhanced version with explicit name (for backward compatibility) -add_executable(c2pool_enhanced c2pool_refactored.cpp) +add_executable(c2pool_enhanced main_ltc.cpp) target_link_libraries(c2pool_enhanced c2pool_node_enhanced c2pool_payout @@ -137,6 +137,28 @@ target_link_libraries(c2pool_enhanced ) target_link_libraries(c2pool_enhanced c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39) +# c2pool-ltc: LTC (+ embedded DOGE aux merged-mining) reference entrypoint. +# The coin-matrix / release presence gate keys on src/c2pool/main_ltc.cpp +# (see PR #66); this target packages the LTC binary as c2pool-ltc. LTC is the +# reference coin, so this mirrors the c2pool_enhanced link set exactly (c2pool +# and c2pool_enhanced already build the same LTC-native main). DOGE aux rides +# via c2pool_merged_mining -- always compiled in, NO -DAUX_DOGE flag. +add_executable(c2pool-ltc main_ltc.cpp) +target_compile_definitions(c2pool-ltc PRIVATE C2POOL_VERSION="${C2POOL_GIT_VERSION}") +target_link_libraries(c2pool-ltc + c2pool_node_enhanced + c2pool_payout + c2pool_merged_mining + core + ltc + c2pool_storage + ltc_coin + nmc_coin # NMC coin-layer: out-of-line Transaction/MutableTransaction ctors for embedded merged-mining (2b-ii) + nlohmann_json::nlohmann_json + ${Boost_LIBRARIES} +) +target_link_libraries(c2pool-ltc c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39) + # c2pool-btc: BTC SPV embedded p2pool — Phase B0 scaffold (stub entry). # Library `btc` is a clone of `ltc` with namespace renamed and CMake targets # adjusted; real entry-point port is in later B-phases. @@ -302,13 +324,16 @@ target_link_libraries(c2pool-dash if(WIN32) target_link_libraries(c2pool ws2_32 mswsock bcrypt dbghelp) target_link_libraries(c2pool_enhanced ws2_32 mswsock bcrypt dbghelp) + target_link_libraries(c2pool-ltc ws2_32 mswsock bcrypt dbghelp) endif() if(MSVC) target_compile_options(c2pool PRIVATE /bigobj) target_compile_options(c2pool_enhanced PRIVATE /bigobj) + target_compile_options(c2pool-ltc PRIVATE /bigobj) # Match Linux 8MB stack (MSVC default is 1MB — deep share validation can overflow) target_link_options(c2pool PRIVATE /STACK:8388608) target_link_options(c2pool_enhanced PRIVATE /STACK:8388608) + target_link_options(c2pool-ltc PRIVATE /STACK:8388608) endif() # Test applications diff --git a/src/c2pool/c2pool_refactored.cpp b/src/c2pool/main_ltc.cpp similarity index 100% rename from src/c2pool/c2pool_refactored.cpp rename to src/c2pool/main_ltc.cpp