Port monero-lws to wownero-lws

Adapts monero-lws for Wownero cryptocurrency:

- Rename all monero-lws-* binaries to wownero-lws-*
- Update submodule to point to official Wownero repo
- Use Wownero default ports (RPC: 34568, ZMQ: 34569)
- Update data directory to ~/.wownero/light_wallet_server
- Adapt next_difficulty() calls for Wownero API signature

Key technical changes for Wownero compatibility:

- BulletproofPlus (RCTTypeBulletproofPlus, type 8) commitment verification:
  Wownero stores BP+ commitments in 'divided by 8' form. Must call
  rct::scalarmult8() on outPk commitment before comparing with computed
  commitment (mask*G + amount*H). This is essential for amount decryption.

- Pass rct_type to decode_amount() for proper commitment handling

- Handle Wownero's ZMQ JSON format for ecdhTuple (32-byte mask/amount fields)

No fork of Wownero is required - uses official codeberg.org/wownero/wownero.
This commit is contained in:
jwinterm
2026-01-04 13:12:56 -05:00
parent f2b3534002
commit 97877eda27
35 changed files with 809 additions and 396 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "external/monero"] [submodule "external/monero"]
path = external/monero path = external/monero
url = https://github.com/monero-project/monero.git url = https://codeberg.org/wownero/wownero.git

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2020, The Monero Project # Copyright (c) 2020, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -27,7 +28,7 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 3.5.0) cmake_minimum_required(VERSION 3.5.0)
project(monero-lws) project(wownero-lws)
enable_language(CXX) enable_language(CXX)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
@@ -41,7 +42,7 @@ if (WITH_RMQ)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMLWS_RMQ_ENABLED") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMLWS_RMQ_ENABLED")
endif() endif()
# If `MONERO_BUILD_DIR` is not specified, monero unit tests will be built with this hack # If `WOWNERO_BUILD_DIR` is not specified, wownero unit tests will be built with this hack
set (LWS_BUILD_TESTS "${BUILD_TESTS}") set (LWS_BUILD_TESTS "${BUILD_TESTS}")
set (BUILD_TESTS "Off") set (BUILD_TESTS "Off")
@@ -64,10 +65,9 @@ if(STATIC)
endif() endif()
endif() endif()
set(MONERO_LIBRARIES set(WOWNERO_LIBRARIES
daemon_messages daemon_messages
serialization serialization
lmdb_lib
net net
cryptonote_core cryptonote_core
cryptonote_basic cryptonote_basic
@@ -80,6 +80,7 @@ set(MONERO_LIBRARIES
blockchain_db blockchain_db
common common
lmdb lmdb
lmdb_lib
device device
cncrypto cncrypto
randomx randomx
@@ -89,14 +90,15 @@ set(MONERO_LIBRARIES
wallet-crypto wallet-crypto
) )
set(MONERO_OPTIONAL wallet-crypto) set(WOWNERO_OPTIONAL wallet-crypto)
if (MONERO_BUILD_DIR) if (WOWNERO_BUILD_DIR)
set(MONERO_SEARCH_PATHS set(WOWNERO_SEARCH_PATHS
"/contrib/epee/src" "/contrib/epee/src"
"/external/db_drivers/liblmdb" "/external/db_drivers/liblmdb"
"/external/easylogging++" "/external/easylogging++"
"/external/randomwow"
"/src" "/src"
"/src/crypto" "/src/crypto"
"/src/crypto/wallet" "/src/crypto/wallet"
@@ -104,22 +106,42 @@ if (MONERO_BUILD_DIR)
"/src/lmdb" "/src/lmdb"
"/src/ringct" "/src/ringct"
"/src/rpc" "/src/rpc"
"/src/common"
"/src/serialization"
"/src/net"
"/src/cryptonote_core"
"/src/multisig"
"/src/hardforks"
"/src/checkpoints"
"/src/blockchain_db"
"/src/device"
"/src/mnemonics"
) )
# #
# Pull some information from monero build # Pull some information from wownero build
# #
# Needed due to "bug" in monero CMake - the `project` function is used twice! # Needed due to "bug" in wownero CMake - the `project` function is used twice!
if (NOT MONERO_SOURCE_DIR) if (NOT WOWNERO_SOURCE_DIR)
message(FATAL_ERROR "The argument -DMONERO_SOURCE_DIR must specify a location of a monero source tree") message(FATAL_ERROR "The argument -DWOWNERO_SOURCE_DIR must specify a location of a wownero source tree")
endif() endif()
# monero `master` and `release-v0.18` branches use different LIBSODIUM get_filename_component(WOWNERO_SOURCE_DIR "${WOWNERO_SOURCE_DIR}" ABSOLUTE)
get_filename_component(WOWNERO_BUILD_DIR "${WOWNERO_BUILD_DIR}" ABSOLUTE)
message(STATUS "WOWNERO_SOURCE_DIR: ${WOWNERO_SOURCE_DIR}")
message(STATUS "WOWNERO_BUILD_DIR: ${WOWNERO_BUILD_DIR}")
if (NOT EXISTS "${WOWNERO_BUILD_DIR}/CMakeCache.txt")
message(FATAL_ERROR "Wownero cache not found at ${WOWNERO_BUILD_DIR}/CMakeCache.txt. Please ensure WOWNERO_BUILD_DIR is correct and Wownero has been configured.")
endif()
# wownero `master` and release branches use different LIBSODIUM
# find routines. So the upstream cmake names differ # find routines. So the upstream cmake names differ
load_cache(${MONERO_BUILD_DIR} READ_WITH_PREFIX monero_ load_cache(${WOWNERO_BUILD_DIR} READ_WITH_PREFIX wownero_
Boost_THREAD_LIBRARY_RELEASE Boost_THREAD_LIBRARY_RELEASE
CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER
EXTRA_LIBRARIES EXTRA_LIBRARIES
@@ -127,13 +149,13 @@ if (MONERO_BUILD_DIR)
usb_LIBRARY usb_LIBRARY
HIDAPI_INCLUDE_DIR HIDAPI_INCLUDE_DIR
HIDAPI_LIBRARY HIDAPI_LIBRARY
libzmq_INCLUDE_DIRS
LMDB_INCLUDE LMDB_INCLUDE
monero_SOURCE_DIR wownero_SOURCE_DIR
OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR
OPENSSL_CRYPTO_LIBRARY OPENSSL_CRYPTO_LIBRARY
OPENSSL_SSL_LIBRARY OPENSSL_SSL_LIBRARY
pkgcfg_lib_libzmq_zmq ZMQ_LIB
ZMQ_INCLUDE_PATH
sodium_LIBRARY_RELEASE sodium_LIBRARY_RELEASE
SODIUM_LIBRARY SODIUM_LIBRARY
UNBOUND_LIBRARIES UNBOUND_LIBRARIES
@@ -143,67 +165,75 @@ if (MONERO_BUILD_DIR)
PROTOLIB_LIBRARY PROTOLIB_LIBRARY
) )
if (NOT (monero_monero_SOURCE_DIR MATCHES "${MONERO_SOURCE_DIR}")) if (wownero_wownero_SOURCE_DIR AND NOT (wownero_wownero_SOURCE_DIR MATCHES "${WOWNERO_SOURCE_DIR}"))
message(FATAL_ERROR "Invalid Monero source dir - does not appear to match source used for build directory") message(WARNING "Mismatch detected: wownero_wownero_SOURCE_DIR='${wownero_wownero_SOURCE_DIR}' vs WOWNERO_SOURCE_DIR='${WOWNERO_SOURCE_DIR}'. Proceeding anyway...")
endif() endif()
if (NOT (CMAKE_CXX_COMPILER STREQUAL monero_CMAKE_CXX_COMPILER)) if (wownero_CMAKE_CXX_COMPILER AND NOT (CMAKE_CXX_COMPILER STREQUAL wownero_CMAKE_CXX_COMPILER))
message(FATAL_ERROR "Compiler for monero build differs from this project") message(FATAL_ERROR "Compiler for wownero build (${wownero_CMAKE_CXX_COMPILER}) differs from this project (${CMAKE_CXX_COMPILER})")
endif() endif()
if ("${monero_UNBOUND_LIBRARIES}" STREQUAL "UNBOUND_LIBRARIES-NOTFOUND") if ("${wownero_UNBOUND_LIBRARIES}" STREQUAL "UNBOUND_LIBRARIES-NOTFOUND")
unset(monero_UNBOUND_LIBRARIES) unset(wownero_UNBOUND_LIBRARIES)
endif() endif()
if ("${monero_HIDAPI_LIBRARY}" STREQUAL "HIDAPI_LIBRARY-NOTFOUND") if ("${wownero_HIDAPI_LIBRARY}" STREQUAL "HIDAPI_LIBRARY-NOTFOUND")
unset(monero_HIDAPI_INCLUDE_DIR) unset(wownero_HIDAPI_INCLUDE_DIR)
unset(monero_HIDAPI_LIBRARY) unset(wownero_HIDAPI_LIBRARY)
endif() endif()
foreach (LIB ${MONERO_LIBRARIES}) set(WOWNERO_LIBRARY_PATHS "")
find_library(LIB_PATH NAMES "${LIB}" PATHS ${MONERO_BUILD_DIR} PATH_SUFFIXES "/src/${LIB}" "external/${LIB}" ${MONERO_SEARCH_PATHS} NO_DEFAULT_PATH) foreach (PATH ${WOWNERO_SEARCH_PATHS})
list(APPEND WOWNERO_LIBRARY_PATHS "${WOWNERO_BUILD_DIR}${PATH}")
endforeach()
list(FIND MONERO_OPTIONAL "${LIB}" LIB_OPTIONAL) foreach (LIB ${WOWNERO_LIBRARIES})
find_library(LIB_PATH NAMES "${LIB}" PATHS ${WOWNERO_BUILD_DIR} ${WOWNERO_LIBRARY_PATHS} PATH_SUFFIXES "/src/${LIB}" "external/${LIB}" NO_DEFAULT_PATH)
list(FIND WOWNERO_OPTIONAL "${LIB}" LIB_OPTIONAL)
if (NOT LIB_PATH) if (NOT LIB_PATH)
if (LIB_OPTIONAL EQUAL -1) if (LIB_OPTIONAL EQUAL -1)
message(FATAL_ERROR "Unable to find required Monero library ${LIB}") message(FATAL_ERROR "Unable to find required Wownero library ${LIB}")
endif() endif()
else () else ()
set(LIB_NAME "monero::${LIB}") set(LIB_NAME "wownero::${LIB}")
add_library(${LIB_NAME} STATIC IMPORTED) add_library(${LIB_NAME} STATIC IMPORTED)
set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION ${LIB_PATH}) set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION ${LIB_PATH})
list(APPEND IMPORTED_MONERO_LIBRARIES "${LIB_NAME}") list(APPEND IMPORTED_WOWNERO_LIBRARIES "${LIB_NAME}")
endif() endif()
unset(LIB_PATH CACHE) unset(LIB_PATH CACHE)
endforeach() endforeach()
set(LMDB_INCLUDE "${monero_LMDB_INCLUDE}") set(LMDB_INCLUDE "${wownero_LMDB_INCLUDE}")
set(LMDB_LIB_PATH "monero::lmdb") set(LMDB_LIB_PATH "wownero::lmdb")
else () # NOT MONERO_BUILD_DIR else () # NOT WOWNERO_BUILD_DIR
if (NOT MONERO_SOURCE_DIR) if (NOT WOWNERO_SOURCE_DIR)
set (MONERO_SOURCE_DIR "${monero-lws_SOURCE_DIR}/external/monero") set (WOWNERO_SOURCE_DIR "${wownero-lws_SOURCE_DIR}/external/monero")
endif () endif ()
include(FetchContent) include(FetchContent)
FetchContent_Declare(monero SOURCE_DIR "${MONERO_SOURCE_DIR}" EXCLUDE_FROM_ALL) FetchContent_Declare(wownero SOURCE_DIR "${WOWNERO_SOURCE_DIR}" EXCLUDE_FROM_ALL)
if (NOT monero_POPULATED) if (NOT wownero_POPULATED)
FetchContent_MakeAvailable(monero) FetchContent_MakeAvailable(wownero)
endif () endif ()
set(MONERO_BUILD_DIR "${monero_BINARY_DIR}") set(WOWNERO_BUILD_DIR "${wownero_BINARY_DIR}")
set(IMPORTED_MONERO_LIBRARIES "${MONERO_LIBRARIES}") set(IMPORTED_WOWNERO_LIBRARIES "${WOWNERO_LIBRARIES}")
set(monero_Boost_THREAD_LIBRARY_RELEASE "${Boost_THREAD_LIBRARY_RELEASE}") set(LMDB_LIB_PATH "lmdb")
set(monero_pkgcfg_lib_libzmq_zmq "${pkgcfg_lib_libzmq_zmq}") set(wownero_Boost_THREAD_LIBRARY_RELEASE "${Boost_THREAD_LIBRARY_RELEASE}")
# Wownero uses ZMQ_LIB directly (via find_library), not pkg-config
set(wownero_ZMQ_LIB "${ZMQ_LIB}")
set(wownero_ZMQ_INCLUDE_PATH "${ZMQ_INCLUDE_PATH}")
if (SODIUM_LIBRARY) if (SODIUM_LIBRARY)
set(monero_SODIUM_LIBRARY "${SODIUM_LIBRARY}") set(wownero_SODIUM_LIBRARY "${SODIUM_LIBRARY}")
else() else()
set(monero_SODIUM_LIBRARY "${monero_sodium_LIBRARY_RELEASE}") set(wownero_SODIUM_LIBRARY "${wownero_sodium_LIBRARY_RELEASE}")
endif() endif()
endif() endif()
# #
# Dependencies specific to monero-lws # Dependencies specific to wownero-lws
# #
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
@@ -211,16 +241,28 @@ find_package(Threads REQUIRED)
# boost # boost
set(Boost_NO_BOOST_CMAKE ON) set(Boost_NO_BOOST_CMAKE ON)
# If Wownero was built statically, we should probably do the same
if (WOWNERO_BUILD_DIR AND NOT STATIC)
if (wownero_Boost_THREAD_LIBRARY_RELEASE MATCHES ".*\\.a$")
message(STATUS "Wownero build was static, enabling STATIC for this project")
set(STATIC ON)
endif()
endif()
if(STATIC) if(STATIC)
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON) set(Boost_USE_STATIC_RUNTIME ON)
endif() endif()
find_package(Boost 1.70 QUIET REQUIRED COMPONENTS chrono context coroutine filesystem program_options regex serialization thread) find_package(Boost 1.70 QUIET REQUIRED COMPONENTS chrono context coroutine filesystem program_options regex serialization thread)
if (NOT (Boost_THREAD_LIBRARY STREQUAL monero_Boost_THREAD_LIBRARY_RELEASE)) get_filename_component(REAL_Boost_THREAD_LIBRARY "${Boost_THREAD_LIBRARY}" REALPATH)
message(STATUS "Found Boost_THREAD_LIBRARY: ${Boost_THREAD_LIBRARY}") get_filename_component(REAL_wownero_Boost_THREAD_LIBRARY "${wownero_Boost_THREAD_LIBRARY_RELEASE}" REALPATH)
message(STATUS "Found monero_Boost_THREAD_LIBRARY_RELEASE: ${monero_Boost_THREAD_LIBRARY_RELEASE}")
message(FATAL_ERROR "Boost libraries for monero build differs from this project") if (NOT (REAL_Boost_THREAD_LIBRARY STREQUAL REAL_wownero_Boost_THREAD_LIBRARY))
message(STATUS "Found Boost_THREAD_LIBRARY: ${Boost_THREAD_LIBRARY} (real: ${REAL_Boost_THREAD_LIBRARY})")
message(STATUS "Found wownero_Boost_THREAD_LIBRARY_RELEASE: ${wownero_Boost_THREAD_LIBRARY_RELEASE} (real: ${REAL_wownero_Boost_THREAD_LIBRARY})")
message(FATAL_ERROR "Boost libraries for wownero build differs from this project")
endif() endif()
if (WITH_RMQ) if (WITH_RMQ)
@@ -231,61 +273,88 @@ else()
set(RMQ_LIBRARY "") set(RMQ_LIBRARY "")
endif() endif()
set(ZMQ_INCLUDE_PATH "${libzmq_INCLUDE_DIRS}") # Use ZMQ from Wownero build
set(ZMQ_LIB "${monero_pkgcfg_lib_libzmq_zmq}") if (wownero_ZMQ_INCLUDE_PATH)
if (monero_SODIUM_LIBRARY) set(ZMQ_INCLUDE_PATH "${wownero_ZMQ_INCLUDE_PATH}")
set(SODIUM_LIBRARY "${monero_SODIUM_LIBRARY}") endif()
if (wownero_ZMQ_LIB)
set(ZMQ_LIB "${wownero_ZMQ_LIB}")
endif()
if (wownero_SODIUM_LIBRARY)
set(SODIUM_LIBRARY "${wownero_SODIUM_LIBRARY}")
else () else ()
set(SODIUM_LIBRARY "${monero_sodium_LIBRARY_RELEASE}") set(SODIUM_LIBRARY "${wownero_sodium_LIBRARY_RELEASE}")
endif () endif ()
if(NOT ZMQ_LIB) if(NOT ZMQ_LIB)
message(FATAL_ERROR "Could not find required libzmq") message(FATAL_ERROR "Could not find required libzmq")
endif() endif()
if(monero_PGM_LIBRARY) if(wownero_PGM_LIBRARY AND NOT "${wownero_PGM_LIBRARY}" STREQUAL "PGM_LIBRARY-NOTFOUND")
set(ZMQ_LIB "${ZMQ_LIB};${monero_PGM_LIBRARY}") set(ZMQ_LIB "${ZMQ_LIB};${wownero_PGM_LIBRARY}")
endif() endif()
if(monero_NORM_LIBRARY) if(wownero_NORM_LIBRARY AND NOT "${wownero_NORM_LIBRARY}" STREQUAL "NORM_LIBRARY-NOTFOUND")
set(ZMQ_LIB "${ZMQ_LIB};${monero_NORM_LIBRARY}") set(ZMQ_LIB "${ZMQ_LIB};${wownero_NORM_LIBRARY}")
if(NOT wownero_PROTOLIB_LIBRARY OR "${wownero_PROTOLIB_LIBRARY}" STREQUAL "PROTOLIB_LIBRARY-NOTFOUND")
find_library(PROTOLIB_LIBRARY NAMES protokit protolib)
if(PROTOLIB_LIBRARY)
set(wownero_PROTOLIB_LIBRARY "${PROTOLIB_LIBRARY}")
endif()
endif()
endif() endif()
if(monero_GSSAPI_LIBRARY) if(wownero_GSSAPI_LIBRARY AND NOT "${wownero_GSSAPI_LIBRARY}" STREQUAL "GSSAPI_LIBRARY-NOTFOUND")
set(ZMQ_LIB "${ZMQ_LIB};${monero_GSSAPI_LIBRARY}") set(ZMQ_LIB "${ZMQ_LIB};${wownero_GSSAPI_LIBRARY}")
endif() endif()
if(monero_PROTOLIB_LIBRARY) if(wownero_PROTOLIB_LIBRARY AND NOT "${wownero_PROTOLIB_LIBRARY}" STREQUAL "PROTOLIB_LIBRARY-NOTFOUND")
set(ZMQ_LIB "${ZMQ_LIB};${monero_PROTOLIB_LIBRARY}") set(ZMQ_LIB "${ZMQ_LIB};${wownero_PROTOLIB_LIBRARY}")
endif() endif()
if(monero_sodium_LIBRARY_RELEASE) if(wownero_sodium_LIBRARY_RELEASE AND NOT "${wownero_sodium_LIBRARY_RELEASE}" STREQUAL "sodium_LIBRARY_RELEASE-NOTFOUND")
set(ZMQ_LIB "${ZMQ_LIB};${monero_sodium_LIBRARY_RELEASE}") set(ZMQ_LIB "${ZMQ_LIB};${wownero_sodium_LIBRARY_RELEASE}")
endif() endif()
if(STATIC AND NOT IOS) if(STATIC AND NOT IOS)
if(UNIX) if(UNIX)
set(monero_OPENSSL_LIBRARIES "${monero_OPENSSL_LIBRARIES};${CMAKE_DL_LIBS};${CMAKE_THREAD_LIBS_INIT}") find_package(ZLIB)
if(ZLIB_FOUND)
set(wownero_OPENSSL_CRYPTO_LIBRARY "${wownero_OPENSSL_CRYPTO_LIBRARY};${ZLIB_LIBRARIES}")
endif()
find_library(ZSTD_LIBRARY NAMES zstd)
if(ZSTD_LIBRARY)
set(wownero_OPENSSL_CRYPTO_LIBRARY "${wownero_OPENSSL_CRYPTO_LIBRARY};${ZSTD_LIBRARY}")
else()
set(wownero_OPENSSL_CRYPTO_LIBRARY "${wownero_OPENSSL_CRYPTO_LIBRARY};zstd")
endif()
find_library(EVENT_LIBRARY NAMES event libevent)
if(EVENT_LIBRARY)
set(wownero_UNBOUND_LIBRARIES "${wownero_UNBOUND_LIBRARIES};${EVENT_LIBRARY}")
else()
set(wownero_UNBOUND_LIBRARIES "${wownero_UNBOUND_LIBRARIES};event")
endif()
set(wownero_OPENSSL_LIBRARIES "${wownero_OPENSSL_LIBRARIES};${CMAKE_DL_LIBS};${CMAKE_THREAD_LIBS_INIT};rt")
endif() endif()
endif() endif()
if(APPLE) if(APPLE)
find_library(IOKIT_LIBRARY IOKit) find_library(IOKIT_LIBRARY IOKit)
list(APPEND IMPORTED_MONERO_LIBRARIES ${IOKIT_LIBRARY}) list(APPEND IMPORTED_WOWNERO_LIBRARIES ${IOKIT_LIBRARY})
endif() endif()
add_library(monero::libraries INTERFACE IMPORTED) add_library(wownero::libraries INTERFACE IMPORTED)
set_property(TARGET monero::libraries PROPERTY set_property(TARGET wownero::libraries PROPERTY
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
${monero_HIDAPI_INCLUDE_DIRS} ${wownero_HIDAPI_INCLUDE_DIRS}
${monero_OPENSSL_INCLUDE_DIR} ${wownero_OPENSSL_INCLUDE_DIR}
"${MONERO_BUILD_DIR}/generated_include" "${WOWNERO_BUILD_DIR}/generated_include"
"${MONERO_SOURCE_DIR}/contrib/epee/include" "${WOWNERO_SOURCE_DIR}/contrib/epee/include"
"${MONERO_SOURCE_DIR}/external/easylogging++" "${WOWNERO_SOURCE_DIR}/external/easylogging++"
"${MONERO_SOURCE_DIR}/external/rapidjson/include" "${WOWNERO_SOURCE_DIR}/external/rapidjson/include"
"${MONERO_SOURCE_DIR}/external/supercop/include" "${WOWNERO_SOURCE_DIR}/external/supercop/include"
"${MONERO_SOURCE_DIR}/src" "${WOWNERO_SOURCE_DIR}/src"
) )
set_property(TARGET monero::libraries PROPERTY set_property(TARGET wownero::libraries PROPERTY
INTERFACE_LINK_LIBRARIES INTERFACE_LINK_LIBRARIES
${IMPORTED_MONERO_LIBRARIES} ${IMPORTED_WOWNERO_LIBRARIES}
${Boost_CHRONO_LIBRARY} ${Boost_CHRONO_LIBRARY}
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
@@ -293,18 +362,21 @@ set_property(TARGET monero::libraries PROPERTY
${Boost_SERIALIZATION_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY} ${Boost_THREAD_LIBRARY}
${monero_HIDAPI_LIBRARY} ${wownero_HIDAPI_LIBRARY}
${monero_usb_LIBRARY} ${wownero_usb_LIBRARY}
${monero_LIBUDEV_LIBRARY} ${wownero_LIBUDEV_LIBRARY}
${monero_OPENSSL_SSL_LIBRARY} ${wownero_OPENSSL_SSL_LIBRARY}
${monero_OPENSSL_CRYPTO_LIBRARY} ${wownero_OPENSSL_CRYPTO_LIBRARY}
${SODIUM_LIBRARY} ${SODIUM_LIBRARY}
${monero_UNBOUND_LIBRARIES} ${wownero_UNBOUND_LIBRARIES}
${ZMQ_LIB}
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
Threads::Threads
rt
) )
# #
# Build monero-lws code # Build wownero-lws code
# #
add_subdirectory(src) add_subdirectory(src)

View File

@@ -1,7 +1,8 @@
# Initial base from https://github.com/sethforprivacy/monero-lws/blob/588c7f1965d3afbda8a65dc870645650e063e897/Dockerfile # Initial base from https://github.com/sethforprivacy/monero-lws/blob/588c7f1965d3afbda8a65dc870645650e063e897/Dockerfile
# Adapted for Wownero by The Wownero Project
# Set monerod version to install from github # Set wownerod version to install from codeberg
ARG MONERO_COMMIT_HASH=d32b5bfe18e2f5b979fa8dc3a8966c76159ca722 ARG WOWNERO_COMMIT_HASH=v0.11.4.0
# Select ubuntu:22.04 for the build image base # Select ubuntu:22.04 for the build image base
FROM ubuntu:22.04 as build FROM ubuntu:22.04 as build
@@ -34,9 +35,9 @@ RUN apt-get install --no-install-recommends -y \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Set necessary args and environment variables for building Monero # Set necessary args and environment variables for building Wownero
ARG MONERO_BRANCH ARG WOWNERO_BRANCH
ARG MONERO_COMMIT_HASH ARG WOWNERO_COMMIT_HASH
ARG NPROC ARG NPROC
ARG TARGETARCH ARG TARGETARCH
ENV CFLAGS='-fPIC' ENV CFLAGS='-fPIC'
@@ -88,13 +89,13 @@ RUN set -ex && wget https://archives.boost.io/release/1.89.0/source/boost_1_89_0
--with-chrono --with-context --with-coroutine --with-date_time --with-filesystem --with-locale \ --with-chrono --with-context --with-coroutine --with-date_time --with-filesystem --with-locale \
--with-program_options --with-regex --with-serialization --with-serialization install --with-program_options --with-regex --with-serialization --with-serialization install
# Switch to Monero source directory # Switch to Wownero source directory
WORKDIR /monero WORKDIR /wownero
# Git pull Monero source at specified tag/branch and compile monerod binary # Git pull Wownero source at specified tag/branch and compile wownerod binary
RUN git clone --recursive \ RUN git clone --recursive \
https://github.com/monero-project/monero . \ https://codeberg.org/wownero/wownero.git . \
&& git checkout ${MONERO_COMMIT_HASH} \ && git checkout ${WOWNERO_COMMIT_HASH} \
&& git submodule init && git submodule update \ && git submodule init && git submodule update \
&& mkdir -p build/release && cd build/release \ && mkdir -p build/release && cd build/release \
# Create make build files manually for release-static-linux-${TARGETARCH} # Create make build files manually for release-static-linux-${TARGETARCH}
@@ -103,11 +104,11 @@ RUN git clone --recursive \
"amd64") cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x64" ../.. ;; \ "amd64") cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x64" ../.. ;; \
*) echo "Dockerfile does not support this platform"; exit 1 ;; \ *) echo "Dockerfile does not support this platform"; exit 1 ;; \
esac \ esac \
# Build only monerod binary using number of available threads # Build only wownerod binary using number of available threads
&& cd /monero && nice -n 19 ionice -c2 -n7 make -j${NPROC:-$(nproc)} -C build/release daemon lmdb_lib multisig && cd /wownero && nice -n 19 ionice -c2 -n7 make -j${NPROC:-$(nproc)} -C build/release daemon lmdb_lib multisig
# Switch to monero-lws source directory # Switch to wownero-lws source directory
WORKDIR /monero-lws WORKDIR /wownero-lws
COPY . . COPY . .
@@ -115,27 +116,28 @@ ARG NPROC
RUN set -ex \ RUN set -ex \
&& git submodule init && git submodule update \ && git submodule init && git submodule update \
&& rm -rf build && mkdir build && cd build \ && rm -rf build && mkdir build && cd build \
&& cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_TESTS=ON -D WITH_RMQ=ON -D MONERO_SOURCE_DIR=/monero -D MONERO_BUILD_DIR=/monero/build/release .. \ && cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_TESTS=ON -D WITH_RMQ=ON -D WOWNERO_SOURCE_DIR=/wownero -D WOWNERO_BUILD_DIR=/wownero/build/release .. \
&& make -j${NPROC:-$(nproc)} \ && make -j${NPROC:-$(nproc)} \
&& ./tests/unit/monero-lws-unit && ./tests/unit/wownero-lws-unit
# Begin final image build # Begin final image build
# Select Ubuntu 20.04LTS for the image base # Select Ubuntu 22.04LTS for the image base
FROM ubuntu:22.04 FROM ubuntu:22.04
# Add user and setup directories for monero-lws # Add user and setup directories for wownero-lws
RUN useradd -ms /bin/bash monero-lws \ RUN useradd -ms /bin/bash wownero-lws \
&& mkdir -p /home/monero-lws/.bitmonero/light_wallet_server \ && mkdir -p /home/wownero-lws/.wownero/light_wallet_server \
&& chown -R monero-lws:monero-lws /home/monero-lws/.bitmonero && chown -R wownero-lws:wownero-lws /home/wownero-lws/.wownero
USER monero-lws USER wownero-lws
# Switch to home directory and install newly built monero-lws binary # Switch to home directory and install newly built wownero-lws binary
WORKDIR /home/monero-lws WORKDIR /home/wownero-lws
COPY --chown=monero-lws:monero-lws --from=build /monero-lws/build/src/monero-lws-daemon /usr/local/bin/ COPY --chown=wownero-lws:wownero-lws --from=build /wownero-lws/build/src/wownero-lws-daemon /usr/local/bin/
COPY --chown=monero-lws:monero-lws --from=build /monero-lws/build/src/monero-lws-admin /usr/local/bin/ COPY --chown=wownero-lws:wownero-lws --from=build /wownero-lws/build/src/wownero-lws-admin /usr/local/bin/
# Expose REST server port # Expose REST server port
EXPOSE 8443 EXPOSE 8443
ENTRYPOINT ["monero-lws-daemon"] ENTRYPOINT ["wownero-lws-daemon"]
CMD ["--daemon=tcp://monerod:18082", "--sub=tcp://monerod:18083", "--log-level=4"] # Wownero default RPC port is 34568, ZMQ pub is 34569
CMD ["--daemon=tcp://wownerod:34568", "--sub=tcp://wownerod:34569", "--log-level=4"]

464
README.md
View File

@@ -1,44 +1,74 @@
# monero-lws # wownero-lws
> This project is **NOT** a part of the official monero "core" code, but will > This is a fork of [monero-lws](https://github.com/vtnerd/monero-lws) adapted
> hopefully be merged into that project as a new repository seperate from the > for the Wownero cryptocurrency. We aim to stay compatible with upstream
> [`monero-project/monero`](https://github.com/monero-project/monero) > changes to ease merging of security and feature updates.
> repository.
## Table of Contents ## Table of Contents
- [Introduction](#introduction) - [Introduction](#introduction)
- [About this project](#about-this-project) - [About this project](#about-this-project)
- [Changes from monero-lws](#changes-from-monero-lws)
- [License](#license) - [License](#license)
- [Compiling from source](#compiling-from-source)
- [Running wownero-lws](#running-wownero-lws)
- [Docker](#docker) - [Docker](#docker)
- [Compiling Monero-lws from source](#compiling-monero-lws-from-source) - [Deployment](#deployment)
- [Syncing with upstream monero-lws](#syncing-with-upstream-monero-lws)
- [Contributing](#contributing)
## Introduction ## Introduction
Monero is a private, secure, untraceable, decentralised digital currency. You are your bank, you control your funds, and nobody can trace your transfers unless you allow them to do so. Wownero is a privacy-focused, CPU-mineable cryptocurrency and a "fun" fork of Monero. It uses the RandomWOW proof-of-work algorithm and shares Monero's commitment to privacy and decentralization.
**Privacy:** Monero uses a cryptographically sound system to allow you to send and receive funds without your transactions being easily revealed on the blockchain (the ledger of transactions that everyone has). This ensures that your purchases, receipts, and all transfers remain absolutely private by default. **Privacy:** Wownero uses a cryptographically sound system to allow you to send and receive funds without your transactions being easily revealed on the blockchain. This ensures that your purchases, receipts, and all transfers remain absolutely private by default.
**Security:** Using the power of a distributed peer-to-peer consensus network, every transaction on the network is cryptographically secured. Individual wallets have a 25 word mnemonic seed that is only displayed once, and can be written down to backup the wallet. Wallet files are encrypted with a passphrase to ensure they are useless if stolen. **Security:** Using the power of a distributed peer-to-peer consensus network, every transaction on the network is cryptographically secured. Individual wallets have a 25 word mnemonic seed that is only displayed once, and can be written down to backup the wallet.
**Untraceability:** By taking advantage of ring signatures, a special property of a certain type of cryptography, Monero is able to ensure that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer. **Untraceability:** By taking advantage of ring signatures, Wownero ensures that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer.
**Decentralization:** The utility of monero depends on its decentralised peer-to-peer consensus network - anyone should be able to run the monero software, validate the integrity of the blockchain, and participate in all aspects of the monero network using consumer-grade commodity hardware. Decentralization of the monero network is maintained by software development that minimizes the costs of running the monero software and inhibits the proliferation of specialized, non-commodity hardware.
## About this project ## About this project
This is an implementation of the [Monero light-wallet REST API](https://github.com/monero-project/meta/blob/master/api/lightwallet_rest.md) This is an implementation of the light-wallet REST API for Wownero, adapted from
(i.e. MyMonero compatible). Clients can submit their Monero viewkey via the REST [monero-lws](https://github.com/vtnerd/monero-lws). Clients can submit their
API, and the server will scan for incoming Monero blockchain transactions. Wownero viewkey via the REST API, and the server will scan for incoming Wownero
blockchain transactions.
Differences from [OpenMonero](https://github.com/moneroexamples/openmonero): **Features:**
- LMDB instead of MySQL - LMDB database (no MySQL required)
- View keys stored in database - scanning occurs continuously in background - View keys stored in database - scanning occurs continuously in background
- Uses ZeroMQ interface to `monerod` with chain subscription ("push") support - Uses ZeroMQ interface to `wownerod` with chain subscription ("push") support
- Uses amd64 ASM acceleration from Monero project, if available
- Supports webhook notifications, including "0-conf" notification - Supports webhook notifications, including "0-conf" notification
- Compatible with MyMonero-style light wallet clients
## Changes from monero-lws
This fork includes the following modifications to support Wownero:
| Component | Change |
|-----------|--------|
| Submodule | `external/monero` points to `codeberg.org/wownero/wownero` |
| Build system | All CMake targets renamed from `monero-lws-*` to `wownero-lws-*` |
| Libraries | Links against Wownero libraries (includes RandomWOW PoW) |
| Difficulty | Updated `next_difficulty()` calls for Wownero's API signature |
| Default ports | RPC: 34568, ZMQ: 34569 (Wownero defaults) |
| Data directory | Uses `~/.wownero/light_wallet_server` |
| RingCT decryption | BulletproofPlus commitments require `scalarmult8()` (see below) |
### Wownero BulletproofPlus Commitment Format
Wownero stores BulletproofPlus (`RCTTypeBulletproofPlus`, type 8) output commitments
in a "divided by 8" form for efficiency. When verifying decrypted amounts, the
commitment from `outPk` must be multiplied by 8 using `rct::scalarmult8()` before
comparing with the computed commitment `mask*G + amount*H`.
This differs from standard Monero and is the key change required for amount
decryption to work on Wownero's post-HF18 transactions.
The directory structure is kept identical to upstream to simplify rebasing.
## License ## License
@@ -46,127 +76,321 @@ Differences from [OpenMonero](https://github.com/moneroexamples/openmonero):
See [LICENSE](LICENSE). See [LICENSE](LICENSE).
## Docker ## Compiling from source
Data is stored at `/home/monero-lws/.bitmonero/light_wallet_server` by default,
and be modified by `--db-path` at runtime.
### Latest Stable Release
Docker image for latest stable release can be fetched via:
* `docker pull ghcr.io/vtnerd/monero-lws`
* `docker pull vtnerd/monero-lws`
Users of this tag should never expect a DB migration issue, provided they never
"downgrade" to a prior major version.
### Supported Releases
Docker images for `0` and `0.3` are provided. The major number refers to
backwards incompatible DB changes, and the minor revision refers to new features
that could cause instability. Stability minded users can use these tags while
they are still listed as officially supported here in the README or on the
Docker overview page.
* `docker pull ghcr.io/vtnerd/monero-lws:0`
* `docker pull vtnerd/monero-lws:0`
* `docker pull ghcr.io/vtnerd/monero-lws:0.3`
* `docker pull vtnerd/monero-lws:0.3`
### Alpha Release
Docker image for the `master` (alpha) branch can be fetched via:
* `docker pull ghcr.io/vtnerd/monero-lws:master`
* `docker pull vtnerd/monero-lws:master`
This branch differs from the `develop` branch in that users should NOT expect
incompatible DB changes; if users never "roll-back" their copy of `master` then
the DB should also be in a valid state for use. However, the `master` version
is considered alpha software so things could break, resulting in complications
if the DB was not saved prior to upgrading.
We need alpha testers, so consider using this where possible!
> The `develop` branch should only be used for development purposes - breaking
> DB changes are expected (but probably rare). No docker image is provided for
> this branch - see compilation section below.
## Compiling Monero-lws from source
### Dependencies ### Dependencies
The first step, when buiding from source, is installing the [dependencies of the Install the [dependencies required by Wownero](https://codeberg.org/wownero/wownero#dependencies).
monero project](https://github.com/monero-project/monero?tab=readme-ov-file#dependencies). These are inherited transitively by wownero-lws.
`monero-lws` depends on the monero project for building, so the dependencies of
that project become the dependencies of this project transitively. Only the
"non-vendored" dependencies need to be installed. There are no additional
dependencies that need installing.
### Beginner Build **Ubuntu/Debian:**
```bash
sudo apt update && sudo apt install -y \
build-essential cmake git pkg-config \
libboost-all-dev libssl-dev libzmq3-dev \
libunbound-dev libsodium-dev libpgm-dev \
libhidapi-dev libusb-1.0-0-dev libprotobuf-dev \
protobuf-compiler libudev-dev
```
The easiest method for building is to use git submodules to pull in the correct ### Quick Build (Recommended)
Monero project dependency:
This builds using the official Wownero source as a submodule. No custom fork is needed.
```bash ```bash
git clone https://github.com/vtnerd/monero-lws.git git clone --recursive https://codeberg.org/wownero/wownero-lws.git
mkdir monero-lws/build && cd monero-lws/build cd wownero-lws
git submodule update --init --recursive mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ../ cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc) make -j$(nproc)
``` ```
* On macOS replace `-j$(nproc)` with `-j8` or the number of cores on your The binaries will be in `build/src/`:
system. - `wownero-lws-daemon` - Main server daemon
* Each branch (`master`, and `develop`) should have the correct submodule for - `wownero-lws-admin` - Administration tool
building that particular branch. - `wownero-lws-client` - Client utility
* The `submodule` step is being run inside of the `monero-lws` directory, such
that all of vendored dependencies are automatically fetched.
* The instructions above will compile the `master` (beta) release of
`monero-lws`
* The resulting executables can be found in `monero-lws/build/src`
### Advanced Build ### Advanced Build (Separate Wownero tree)
The monero source and build directories can be manually specified, which cuts If you already have a Wownero source tree built (e.g. you compiled `wownerod` yourself), you can link against it. However, **the standard Wownero build uses OBJECT libraries**, which are not compatible with wownero-lws's linking requirements.
the build time in half and potentially re-uses the same source tree for multiple
builds. The process for advanced building is: You have two options:
#### Option A: Use the LWS-compatible Wownero fork (easiest)
```bash ```bash
git clone https://github.com/monero-project/monero.git git clone https://codeberg.org/jw_wow/wownero.git
git clone https://github.com/vtnerd/monero-lws.git cd wownero
mkdir monero-lws/build git checkout lws-compat-fix
mkdir monero/build && cd monero/build
git submodule update --init --recursive git submodule update --init --recursive
cmake -DCMAKE_BUILD_TYPE=Release ../ mkdir -p build && cd build
make -j$(nproc) daemon multisig lmdb_lib cmake -DCMAKE_BUILD_TYPE=Release ..
cd ../../monero-lws/build
cmake -DCMAKE_BUILD_TYPE=Relase -DMONERO_SOURCE_DIR=../../monero -DMONERO_BUILD_DIR=../../monero/build ../
make -j$(nproc) make -j$(nproc)
``` ```
The `master`/`develop` branches of lws should compile against the `master` This fork adds 3 commits that force static library generation (`liblmdb_lib.a`, etc.) which wownero-lws requires.
branch of monero. The release branches specify which monero branch to compile
against - `release-v0.3_0.18` indicates that monero `0.18` should be used as
the source directory. The [beginner build process](#beginner-build) handles all
of this with git submodules.
* On macOS replace `-j$(nproc)` with `-j8` or the numebr of cores on your Then build wownero-lws:
system.
* Notice that the `submodule` step is only being run in the `monero` project;
`monero-lws` intentionally does not initialize submodules in the advanced
mode of building.
* The instructions above will compile the `master` (beta) release of
`monero-lws`.
* The resulting executables can be found in `build/src`
## Running monero-lws-daemon
The build places the binary in `src/` sub-directory within the build directory
from which cmake was invoked (repository root by default). To run in
foreground:
```bash ```bash
./src/monero-lws-daemon git clone https://codeberg.org/wownero/wownero-lws.git
cd wownero-lws
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DWOWNERO_SOURCE_DIR=~/wownero \
-DWOWNERO_BUILD_DIR=~/wownero/build/Linux/master/release ..
make -j$(nproc)
``` ```
To list all available options, run `./src/monero-lws-daemon --help`. #### Option B: Use the submodule method (no fork needed)
The Quick Build method above uses Wownero as a submodule and builds it internally with the correct settings. This is the recommended approach if you don't need to link against a specific `wownerod` binary.
## Running wownero-lws
### Prerequisites
You need a running `wownerod` with ZMQ enabled:
```bash
wownerod --zmq-pub tcp://127.0.0.1:34569
```
### Starting the daemon
```bash
./wownero-lws-daemon \
--daemon=tcp://127.0.0.1:34568 \
--sub=tcp://127.0.0.1:34569 \
--log-level=1
```
### Command-line options
| Option | Description | Default |
|--------|-------------|---------|
| `--daemon` | wownerod RPC address | `tcp://127.0.0.1:34568` |
| `--sub` | wownerod ZMQ pub address | `tcp://127.0.0.1:34569` |
| `--db-path` | LMDB database path | `~/.wownero/light_wallet_server` |
| `--rest-server` | REST API bind address | `https://0.0.0.0:8443` |
| `--rest-ssl-key` | SSL private key file | (required for HTTPS) |
| `--rest-ssl-cert` | SSL certificate file | (required for HTTPS) |
| `--log-level` | Log verbosity (0-4) | `0` |
| `--help` | Show all options | |
### Verify installation
```bash
./wownero-lws-daemon --version
```
### Adding accounts
Use `wownero-lws-admin` to manage wallet accounts:
```bash
# Add a new account
./wownero-lws-admin add_account <primary_address> <view_key>
# List all accounts
./wownero-lws-admin list_accounts
# Check account status
./wownero-lws-admin account_status <primary_address>
# Accept a pending account request
./wownero-lws-admin accept_requests create <primary_address>
# Rescan account from specific height
./wownero-lws-admin rescan <height> <primary_address>
```
## REST API
The REST API is compatible with MyMonero-style light wallet clients.
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/login` | POST | Authenticate with address + view key |
| `/get_address_info` | POST | Get account balance and status |
| `/get_address_txs` | POST | Get transaction history |
| `/get_unspent_outs` | POST | Get spendable outputs |
| `/get_random_outs` | POST | Get decoy outputs for ring signatures |
| `/submit_raw_tx` | POST | Broadcast a signed transaction |
| `/import_request` | POST | Request account import from genesis |
See the [monero-lws documentation](https://github.com/vtnerd/monero-lws#rest-api) for full API details.
## Docker
### Building the image
```bash
git clone https://codeberg.org/wownero/wownero-lws.git
cd wownero-lws
docker build -t wownero-lws .
```
### Running with Docker Compose
Create `docker-compose.yml`:
```yaml
version: '3.8'
services:
wownerod:
image: wownero/wownerod:latest
command: >
--non-interactive
--zmq-pub tcp://0.0.0.0:34569
--rpc-bind-ip 0.0.0.0
--confirm-external-bind
volumes:
- wownerod-data:/home/wownero/.wownero
ports:
- "34567:34567" # P2P
- "34568:34568" # RPC
wownero-lws:
image: wownero-lws:latest
command: >
--daemon=tcp://wownerod:34568
--sub=tcp://wownerod:34569
--log-level=1
volumes:
- wownero-lws-data:/home/wownero-lws/.wownero
ports:
- "8443:8443"
depends_on:
- wownerod
volumes:
wownerod-data:
wownero-lws-data:
```
```bash
docker-compose up -d
```
## Deployment
### Production Checklist
1. **TLS Certificate**: Use Let's Encrypt or similar for the REST API
2. **Firewall**: Only expose port 8443 (REST API) publicly
3. **Reverse Proxy**: Consider nginx/caddy in front for rate limiting
4. **Backups**: Regularly backup `~/.wownero/light_wallet_server/`
5. **Monitoring**: Monitor disk space (LMDB can grow large)
### Example nginx config
```nginx
server {
listen 443 ssl http2;
server_name lws.example.com;
ssl_certificate /etc/letsencrypt/live/lws.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/lws.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
```
Then run wownero-lws with HTTP internally:
```bash
./wownero-lws-daemon --rest-server http://127.0.0.1:8080 ...
```
## Syncing with upstream monero-lws
This project is designed to be rebased on upstream `vtnerd/monero-lws` updates.
### Setup (one-time)
```bash
cd wownero-lws
git remote add upstream https://github.com/vtnerd/monero-lws.git
git fetch upstream
```
### Updating from upstream
```bash
# Fetch latest upstream changes
git fetch upstream
# Rebase our changes on top of upstream master
git checkout main
git rebase upstream/master
# Resolve any conflicts, then:
git rebase --continue
# Force push to update the fork
git push --force-with-lease origin main
```
### Common conflict areas
When rebasing, conflicts typically occur in:
- `CMakeLists.txt` - variable names (MONERO vs WOWNERO)
- `src/scanner.cpp` - API differences (e.g., `next_difficulty` signature)
- `Dockerfile` - paths and image names
The goal is to keep Wownero-specific changes minimal and isolated.
## Troubleshooting
### "Unable to sync blockchain - wrong --network ?"
If you see this error immediately upon starting `wownero-lws-daemon`, it usually indicates a mismatch between the Wownero source code used to build LWS and the `wownerod` daemon you are connecting to.
**Solution:**
1. Ensure you are building `wownero-lws` against the **exact same version** of the Wownero source code that your daemon uses.
2. Use the `Advanced Build` instructions to point CMake to your local Wownero source tree using `-DWOWNERO_SOURCE_DIR=/path/to/wownero`.
3. **Do not** use `-DMonero_DIR`, as this variable is ignored by `wownero-lws`.
4. After rebuilding, you must delete your LWS database (default: `~/.wownero/light_wallet_server`) and let it resync from scratch.
### "Blockchain reorg detected" loop
If the scanner gets stuck in a loop detecting reorgs at a specific block height:
1. Check if your `wownerod` is fully synced and on the correct chain.
2. This can also be caused by the build mismatch described above (LWS calculating different block hashes than the daemon). Follow the rebuild steps above.
## Contributing
1. Fork the repository on Codeberg
2. Create a feature branch: `git checkout -b my-feature`
3. Commit your changes: `git commit -am 'Add feature'`
4. Push to the branch: `git push origin my-feature`
5. Submit a Pull Request
Please ensure your changes don't break the ability to rebase on upstream.
## Links
- **Wownero**: https://wownero.org
- **Wownero Codeberg**: https://codeberg.org/wownero
- **Upstream monero-lws**: https://github.com/vtnerd/monero-lws
- **Wownero Discord**: https://discord.gg/ykZyAzJhDK
- **Wownero Reddit**: https://reddit.com/r/wownero
## Acknowledgments
- [vtnerd](https://github.com/vtnerd) for creating and maintaining monero-lws
- The Monero Project for the core cryptographic libraries
- The Wownero community for testing and feedback

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2018-2020, The Monero Project # Copyright (c) 2018-2020, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -65,25 +66,24 @@ add_subdirectory(rpc)
add_subdirectory(util) add_subdirectory(util)
# For both the server and admin utility. # For both the server and admin utility.
set(monero-lws-common_sources config.cpp error.cpp) set(wownero-lws-common_sources config.cpp error.cpp)
set(monero-lws-common_headers config.h error.h fwd.h) set(wownero-lws-common_headers config.h error.h fwd.h)
add_library(monero-lws-common ${monero-lws-common_sources} ${monero-lws-common_headers}) add_library(wownero-lws-common ${wownero-lws-common_sources} ${wownero-lws-common_headers})
target_link_libraries(monero-lws-common monero::libraries) target_link_libraries(wownero-lws-common wownero::libraries)
add_library(monero-lws-daemon-common rest_server.cpp scanner.cpp) add_library(wownero-lws-daemon-common rest_server.cpp scanner.cpp)
target_include_directories(monero-lws-daemon-common PUBLIC ${ZMQ_INCLUDE_PATH}) target_include_directories(wownero-lws-daemon-common PUBLIC ${ZMQ_INCLUDE_PATH})
target_link_libraries(monero-lws-daemon-common target_link_libraries(wownero-lws-daemon-common
PUBLIC PUBLIC
monero::libraries ${WOWNERO_lmdb}
${MONERO_lmdb} wownero-lws-common
monero-lws-common wownero-lws-db
monero-lws-db wownero-lws-net
monero-lws-net wownero-lws-rpc
monero-lws-rpc wownero-lws-rpc-scanner
monero-lws-rpc-scanner wownero-lws-wire-json
monero-lws-wire-json wownero-lws-util
monero-lws-util
${Boost_CHRONO_LIBRARY} ${Boost_CHRONO_LIBRARY}
${Boost_COROUTINE_LIBRARY} ${Boost_COROUTINE_LIBRARY}
${Boost_CONTEXT_LIBRARY} ${Boost_CONTEXT_LIBRARY}
@@ -95,42 +95,43 @@ target_link_libraries(monero-lws-daemon-common
${ZMQ_LIB} ${ZMQ_LIB}
${SODIUM_LIBRARY} ${SODIUM_LIBRARY}
Threads::Threads Threads::Threads
wownero::libraries
) )
add_executable(monero-lws-daemon server_main.cpp) add_executable(wownero-lws-daemon server_main.cpp)
target_link_libraries(monero-lws-daemon target_link_libraries(wownero-lws-daemon
PRIVATE PRIVATE
monero::libraries wownero-lws-daemon-common
monero-lws-daemon-common wownero-lws-rpc-scanner
monero-lws-rpc-scanner
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
wownero::libraries
) )
add_executable(monero-lws-admin admin_main.cpp) add_executable(wownero-lws-admin admin_main.cpp)
target_link_libraries(monero-lws-admin target_link_libraries(wownero-lws-admin
PRIVATE PRIVATE
monero::libraries wownero-lws-common
monero-lws-common wownero-lws-db
monero-lws-db wownero-lws-rpc
monero-lws-rpc wownero-lws-wire-json
monero-lws-wire-json
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
Threads::Threads Threads::Threads
wownero::libraries
) )
add_executable(monero-lws-client client_main.cpp) add_executable(wownero-lws-client client_main.cpp)
target_link_libraries(monero-lws-client target_link_libraries(wownero-lws-client
PRIVATE PRIVATE
monero::libraries wownero-lws-common
monero-lws-common wownero-lws-daemon-common
monero-lws-daemon-common wownero-lws-rpc
monero-lws-rpc wownero-lws-rpc-scanner
monero-lws-rpc-scanner
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
Threads::Threads Threads::Threads
wownero::libraries
) )
install(TARGETS monero-lws-daemon DESTINATION bin) install(TARGETS wownero-lws-daemon DESTINATION bin)
install(TARGETS monero-lws-admin DESTINATION bin) install(TARGETS wownero-lws-admin DESTINATION bin)
install(TARGETS monero-lws-client DESTINATION bin) install(TARGETS wownero-lws-client DESTINATION bin)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2018-2020, The Monero Project # Copyright (c) 2018-2020, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,9 +27,9 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-db_sources account.cpp data.cpp storage.cpp string.cpp) set(wownero-lws-db_sources account.cpp data.cpp storage.cpp string.cpp)
set(monero-lws-db_headers account.h data.h fwd.h storage.h string.h) set(wownero-lws-db_headers account.h data.h fwd.h storage.h string.h)
add_library(monero-lws-db ${monero-lws-db_sources} ${monero-lws-db_headers}) add_library(wownero-lws-db ${wownero-lws-db_sources} ${wownero-lws-db_headers})
target_include_directories(monero-lws-db PUBLIC "${LMDB_INCLUDE}") target_include_directories(wownero-lws-db PUBLIC "${LMDB_INCLUDE}")
target_link_libraries(monero-lws-db monero::libraries monero-lws-common monero-lws-lmdb monero-lws-wire-msgpack ${LMDB_LIB_PATH}) target_link_libraries(wownero-lws-db wownero-lws-common wownero-lws-lmdb wownero-lws-wire-msgpack ${LMDB_LIB_PATH} wownero::libraries)

View File

@@ -3178,8 +3178,14 @@ namespace db
std::min(lmdb::to_native(last_block.id), last_update); std::min(lmdb::to_native(last_block.id), last_update);
const std::uint64_t offset = last_same - lmdb::to_native(height); const std::uint64_t offset = last_same - lmdb::to_native(height);
if (MONERO_UNWRAP(do_get_block_hash(*blocks_cur, block_id(last_same))) != *(chain_copy.begin() + offset)) const crypto::hash stored_hash = MONERO_UNWRAP(do_get_block_hash(*blocks_cur, block_id(last_same)));
const crypto::hash scanner_hash = *(chain_copy.begin() + offset);
if (stored_hash != scanner_hash)
{
MERROR("Hash mismatch at block " << last_same << ": DB has " << stored_hash << ", scanner has " << scanner_hash << ". FORCING ROLLBACK to " << last_same);
MONERO_CHECK(rollback_chain(this->db->tables, txn, *blocks_cur, block_id(last_same)));
return {lws::error::blockchain_reorg}; return {lws::error::blockchain_reorg};
}
chain_copy.remove_prefix(offset + 1); chain_copy.remove_prefix(offset + 1);
MONERO_CHECK( MONERO_CHECK(

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2024, The Monero Project # Copyright (c) 2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,9 +27,9 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-lmdb_sources lws_database.cpp lws_error.cpp) set(wownero-lws-lmdb_sources lws_database.cpp lws_error.cpp)
set(monero-lws-lmdb_headers lws_database.h lws_error.h lws_key_stream.h lws_table.h lws_value_stream.h msgpack_table.h) set(wownero-lws-lmdb_headers lws_database.h lws_error.h lws_key_stream.h lws_table.h lws_value_stream.h msgpack_table.h)
add_library(monero-lws-lmdb ${monero-lws-lmdb_sources} ${monero-lws-lmdb_headers}) add_library(wownero-lws-lmdb ${wownero-lws-lmdb_sources} ${wownero-lws-lmdb_headers})
target_include_directories(monero-lws-lmdb PUBLIC "${LMDB_INCLUDE}") target_include_directories(wownero-lws-lmdb PUBLIC "${LMDB_INCLUDE}")
target_link_libraries(monero-lws-lmdb PRIVATE monero::libraries) target_link_libraries(wownero-lws-lmdb PRIVATE wownero::libraries)

View File

@@ -69,6 +69,7 @@ namespace lws_lmdb
environment out{obj}; environment out{obj};
MONERO_LMDB_CHECK(mdb_env_set_maxdbs(out.get(), max_dbs)); MONERO_LMDB_CHECK(mdb_env_set_maxdbs(out.get(), max_dbs));
MONERO_LMDB_CHECK(mdb_env_set_mapsize(out.get(), 10ull * 1024 * 1024 * 1024));
MONERO_LMDB_CHECK(mdb_env_open(out.get(), path, 0, open_flags)); MONERO_LMDB_CHECK(mdb_env_open(out.get(), path, 0, open_flags));
return {std::move(out)}; return {std::move(out)};
} }

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2025, The Monero Project // Copyright (c) 2025, The Monero Project
// Copyright (c) 2024-2025, The Wownero Project
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, are // Redistribution and use in source and binary forms, with or without modification, are
@@ -34,7 +35,7 @@ namespace lws { namespace version
constexpr const char commit[] = "@MLWS_COMMIT_HASH@"; constexpr const char commit[] = "@MLWS_COMMIT_HASH@";
constexpr const char date[] = "@MLWS_COMMIT_DATE@"; constexpr const char date[] = "@MLWS_COMMIT_DATE@";
constexpr const char id[] = "1.0-alpha"; constexpr const char id[] = "1.0-alpha";
constexpr const char name[] = "monero-lws"; constexpr const char name[] = "wownero-lws";
// openmonero is currently on 1.6 and we have multiple additions since then // openmonero is currently on 1.6 and we have multiple additions since then
namespace api namespace api

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2024, The Monero Project # Copyright (c) 2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -28,8 +29,8 @@
add_subdirectory(http) add_subdirectory(http)
set(monero-lws-net_sources zmq_async.cpp) set(wownero-lws-net_sources zmq_async.cpp)
set(monero-lws-net_headers zmq_async.h) set(wownero-lws-net_headers zmq_async.h)
add_library(monero-lws-net ${monero-lws-net_sources} ${monero-lws-net_headers}) add_library(wownero-lws-net ${wownero-lws-net_sources} ${wownero-lws-net_headers})
target_link_libraries(monero-lws-net monero-lws-net-http monero::libraries) target_link_libraries(wownero-lws-net wownero-lws-net-http wownero::libraries)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2024, The Monero Project # Copyright (c) 2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,8 +27,8 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-net-http_sources client.cpp) set(wownero-lws-net-http_sources client.cpp)
set(monero-lws-net-http_headers client.h slice_body.h) set(wownero-lws-net-http_headers client.h slice_body.h)
add_library(monero-lws-net-http ${monero-lws-net-http_sources} ${monero-lws-net-http_headers}) add_library(wownero-lws-net-http ${wownero-lws-net-http_sources} ${wownero-lws-net-http_headers})
target_link_libraries(monero-lws-net-http ${Boost_SYSTEM_LIBRARY} monero::libraries) target_link_libraries(wownero-lws-net-http ${Boost_SYSTEM_LIBRARY} wownero::libraries)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2020-2024, The Monero Project # Copyright (c) 2020-2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -28,9 +29,9 @@
add_subdirectory(scanner) add_subdirectory(scanner)
set(monero-lws-rpc_sources admin.cpp client.cpp daemon_pub.cpp daemon_zmq.cpp light_wallet.cpp lws_pub.cpp rates.cpp) set(wownero-lws-rpc_sources admin.cpp client.cpp daemon_pub.cpp daemon_zmq.cpp light_wallet.cpp lws_pub.cpp rates.cpp)
set(monero-lws-rpc_headers admin.h client.h daemon_pub.h daemon_zmq.h fwd.h json.h light_wallet.h lws_pub.h rates.h) set(wownero-lws-rpc_headers admin.h client.h daemon_pub.h daemon_zmq.h fwd.h json.h light_wallet.h lws_pub.h rates.h)
add_library(monero-lws-rpc ${monero-lws-rpc_sources} ${monero-lws-rpc_headers}) add_library(wownero-lws-rpc ${wownero-lws-rpc_sources} ${wownero-lws-rpc_headers})
target_include_directories(monero-lws-rpc PRIVATE ${RMQ_INCLUDE_DIR}) target_include_directories(wownero-lws-rpc PRIVATE ${RMQ_INCLUDE_DIR})
target_link_libraries(monero-lws-rpc monero::libraries monero-lws-util monero-lws-wire-json monero-lws-wire-wrapper ${RMQ_LIBRARY}) target_link_libraries(wownero-lws-rpc wownero::libraries wownero-lws-util wownero-lws-wire-json wownero-lws-wire-wrapper ${RMQ_LIBRARY})

View File

@@ -71,7 +71,7 @@ namespace rpc
constexpr const char abort_process_signal[] = "PROCESS"; constexpr const char abort_process_signal[] = "PROCESS";
constexpr const char minimal_chain_topic[] = "json-minimal-chain_main"; constexpr const char minimal_chain_topic[] = "json-minimal-chain_main";
constexpr const char full_txpool_topic[] = "json-full-txpool_add"; constexpr const char full_txpool_topic[] = "json-full-txpool_add";
constexpr const int daemon_zmq_linger = 0; constexpr const int daemon_zmq_linger = 1000;
constexpr const int account_zmq_linger = 0; constexpr const int account_zmq_linger = 0;
constexpr const std::int64_t max_msg_sub = 10 * 1024 * 1024; // 50 MiB constexpr const std::int64_t max_msg_sub = 10 * 1024 * 1024; // 50 MiB
constexpr const std::int64_t max_msg_req = 350 * 1024 * 1024; // 350 MiB constexpr const std::int64_t max_msg_req = 350 * 1024 * 1024; // 350 MiB

View File

@@ -28,9 +28,12 @@
#include "daemon_zmq.h" #include "daemon_zmq.h"
#include <boost/optional/optional.hpp> #include <boost/optional/optional.hpp>
#include "misc_log_ex.h"
#include "string_tools.h"
#include "cryptonote_config.h" // monero/src #include "cryptonote_config.h" // monero/src
#include "crypto/crypto.h" // monero/src #include "crypto/crypto.h" // monero/src
#include "rpc/message_data_structs.h" // monero/src #include "rpc/message_data_structs.h" // monero/src
#include "ringct/rctOps.h"
#include "wire/adapted/crypto.h" #include "wire/adapted/crypto.h"
#include "wire/json.h" #include "wire/json.h"
#include "wire/wrapper/array.h" #include "wire/wrapper/array.h"
@@ -61,15 +64,23 @@ namespace
namespace rct namespace rct
{ {
static void read_bytes(wire::json_reader& source, key& self)
{
source.binary(epee::as_mut_byte_span(self.bytes));
}
static void read_bytes(wire::json_reader& source, ctkey& self) static void read_bytes(wire::json_reader& source, ctkey& self)
{ {
self.dest = {}; self.dest = {};
read_bytes(source, self.mask); source.binary(epee::as_mut_byte_span(self.mask));
} }
static void read_bytes(wire::json_reader& source, ecdhTuple& self) static void read_bytes(wire::json_reader& source, ecdhTuple& self)
{ {
wire::object(source, WIRE_FIELD(mask), WIRE_FIELD(amount)); wire::object(source,
WIRE_FIELD(mask),
WIRE_FIELD(amount)
);
} }
static void read_bytes(wire::json_reader& source, clsag& self) static void read_bytes(wire::json_reader& source, clsag& self)
@@ -205,6 +216,11 @@ namespace rct
wire::optional_field("prunable", std::ref(prunable)) wire::optional_field("prunable", std::ref(prunable))
); );
if (self.type != RCTTypeNull)
{
MDEBUG("Parsed rctSig: type=" << (int)self.type << " encrypted_count=" << self.ecdhInfo.size() << " commitments_count=" << self.outPk.size());
}
self.txnFee = 0; self.txnFee = 0;
if (self.type != RCTTypeNull) if (self.type != RCTTypeNull)
{ {
@@ -213,7 +229,7 @@ namespace rct
self.txnFee = std::move(*txnFee); self.txnFee = std::move(*txnFee);
} }
else if (!self.ecdhInfo.empty() || !self.outPk.empty() || txnFee) else if (!self.ecdhInfo.empty() || !self.outPk.empty() || txnFee)
WIRE_DLOG_THROW(wire::error::schema::invalid_key, "Did not expected `encrypted`, `commitments`, or `fee`"); WIRE_DLOG_THROW(wire::error::schema::invalid_key, "Did not expect `encrypted`, `commitments`, or `fee`");
if (prunable) if (prunable)
{ {
@@ -289,30 +305,47 @@ namespace cryptonote
self.vin.reserve(default_inputs); self.vin.reserve(default_inputs);
self.vout.reserve(default_outputs); self.vout.reserve(default_outputs);
self.extra.reserve(default_txextra_size); self.extra.reserve(default_txextra_size);
boost::optional<rct::rctSig> ringct;
wire::object(source, wire::object(source,
WIRE_FIELD(version), WIRE_FIELD(version),
WIRE_FIELD(unlock_time), WIRE_FIELD(unlock_time),
wire::field("inputs", wire::array<max_inputs_per_tx>(std::ref(self.vin))), wire::field("inputs", wire::array<max_inputs_per_tx>(std::ref(self.vin))),
wire::field("outputs", wire::array<max_outputs_per_tx>(std::ref(self.vout))), wire::field("outputs", wire::array<max_outputs_per_tx>(std::ref(self.vout))),
WIRE_FIELD(extra), WIRE_FIELD(extra),
WIRE_FIELD_ARRAY(signatures, max_inputs_per_tx), wire::optional_field("signatures", wire::array<max_inputs_per_tx>(std::ref(self.signatures))),
wire::field("ringct", std::ref(self.rct_signatures)) wire::optional_field("ringct", std::ref(ringct))
); );
if (ringct)
self.rct_signatures = std::move(*ringct);
} }
static void read_bytes(wire::json_reader& source, block& self) static void read_bytes(wire::json_reader& source, block& self)
{ {
using min_hash_size = wire::min_element_sizeof<crypto::hash>; using min_hash_size = wire::min_element_sizeof<crypto::hash>;
self.tx_hashes.reserve(default_transaction_count); self.tx_hashes.reserve(default_transaction_count);
boost::optional<crypto::signature> signature;
boost::optional<uint16_t> vote;
wire::object(source, wire::object(source,
WIRE_FIELD(major_version), WIRE_FIELD(major_version),
WIRE_FIELD(minor_version), WIRE_FIELD(minor_version),
WIRE_FIELD(timestamp), WIRE_FIELD(timestamp),
WIRE_FIELD(miner_tx),
WIRE_FIELD_ARRAY(tx_hashes, min_hash_size),
WIRE_FIELD(prev_id), WIRE_FIELD(prev_id),
WIRE_FIELD(nonce) WIRE_FIELD(nonce),
wire::optional_field("signature", std::ref(signature)),
wire::optional_field("vote", std::ref(vote)),
WIRE_FIELD(miner_tx),
WIRE_FIELD_ARRAY(tx_hashes, min_hash_size)
); );
if (signature)
self.signature = *signature;
if (vote)
self.vote = *vote;
} }
static void read_bytes(wire::json_reader& source, std::vector<transaction>& self) static void read_bytes(wire::json_reader& source, std::vector<transaction>& self)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2024, The Monero Project # Copyright (c) 2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,12 +27,12 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-rpc-scanner_sources set(wownero-lws-rpc-scanner_sources
client.cpp commands.cpp connection.cpp queue.cpp server.cpp write_commands.cpp client.cpp commands.cpp connection.cpp queue.cpp server.cpp write_commands.cpp
) )
set(monero-lws-rpc-scanner_headers set(wownero-lws-rpc-scanner_headers
client.h commands.h connection.h fwd.h queue.h read_commands.h server.h write_commands.h client.h commands.h connection.h fwd.h queue.h read_commands.h server.h write_commands.h
) )
add_library(monero-lws-rpc-scanner ${monero-lws-rpc-scanner_sources} ${monero-lws-rpc-scanner_headers}) add_library(wownero-lws-rpc-scanner ${wownero-lws-rpc-scanner_sources} ${wownero-lws-rpc-scanner_headers})
target_link_libraries(monero-lws-rpc-scanner monero::libraries monero-lws-wire-msgpack) target_link_libraries(wownero-lws-rpc-scanner wownero::libraries wownero-lws-wire-msgpack)

View File

@@ -27,6 +27,7 @@
#include "scanner.h" #include "scanner.h"
#include <algorithm> #include <algorithm>
#include "string_tools.h"
#include <boost/asio/use_future.hpp> #include <boost/asio/use_future.hpp>
#include <boost/numeric/conversion/cast.hpp> #include <boost/numeric/conversion/cast.hpp>
#include <boost/range/combine.hpp> #include <boost/range/combine.hpp>
@@ -528,7 +529,7 @@ namespace lws
{ {
const bool bulletproof2 = (rct::RCTTypeBulletproof2 <= tx.rct_signatures.type); const bool bulletproof2 = (rct::RCTTypeBulletproof2 <= tx.rct_signatures.type);
const auto decrypted = lws::decode_amount( const auto decrypted = lws::decode_amount(
tx.rct_signatures.outPk.at(index).mask, tx.rct_signatures.ecdhInfo.at(index), active_derived, index, bulletproof2 tx.rct_signatures.outPk.at(index).mask, tx.rct_signatures.ecdhInfo.at(index), active_derived, index, bulletproof2, tx.rct_signatures.type
); );
if (!decrypted) if (!decrypted)
{ {
@@ -743,6 +744,12 @@ namespace lws
if (fetched->blocks.empty()) if (fetched->blocks.empty())
throw std::runtime_error{"Daemon unexpectedly returned zero blocks"}; throw std::runtime_error{"Daemon unexpectedly returned zero blocks"};
MINFO("Processing batch: " << fetched->start_height << " to " << (fetched->start_height + fetched->blocks.size() - 1) << " (" << fetched->blocks.size() << " blocks)");
if (!fetched->blocks.empty())
{
MINFO("First block hash: " << cryptonote::get_block_hash(fetched->blocks.front().block) << ", Last block hash: " << cryptonote::get_block_hash(fetched->blocks.back().block));
}
if (fetched->start_height != req.start_height) if (fetched->start_height != req.start_height)
{ {
MWARNING("Daemon sent wrong blocks, resetting state"); MWARNING("Daemon sent wrong blocks, resetting state");
@@ -907,7 +914,7 @@ namespace lws
if (self.stop_) if (self.stop_)
return false; return false;
diff = cryptonote::next_difficulty(pow_window.pow_timestamps, pow_window.cumulative_diffs, get_target_time(db::block_id(fetched->start_height))); diff = cryptonote::next_difficulty(pow_window.pow_timestamps, pow_window.cumulative_diffs, get_target_time(db::block_id(fetched->start_height)), std::uint64_t(fetched->start_height), lws::config::network);
// skip POW hashing if done previously // skip POW hashing if done previously
if (disk && last_pow < db::block_id(fetched->start_height)) if (disk && last_pow < db::block_id(fetched->start_height))
@@ -963,6 +970,8 @@ namespace lws
reader.reader = std::error_code{common_error::kInvalidArgument}; // cleanup reader before next write reader.reader = std::error_code{common_error::kInvalidArgument}; // cleanup reader before next write
MINFO("Thread " << thread_n << " processed " << blockchain.size() << " blocks(s) @ height " << fetched->start_height << " against " << users.size() << " account(s)"); MINFO("Thread " << thread_n << " processed " << blockchain.size() << " blocks(s) @ height " << fetched->start_height << " against " << users.size() << " account(s)");
if (!blockchain.empty())
MINFO("First block hash: " << blockchain.front() << " at height " << (fetched->start_height - blockchain.size() + 1) << ", last block hash: " << blockchain.back() << " at height " << fetched->start_height);
if (!store(self.io_, client, self.webhooks_, epee::to_span(blockchain), epee::to_span(users), epee::to_span(new_pow))) if (!store(self.io_, client, self.webhooks_, epee::to_span(blockchain), epee::to_span(users), epee::to_span(new_pow)))
return false; return false;
@@ -1151,7 +1160,10 @@ namespace lws
for (;;) for (;;)
{ {
if (req.known_hashes.empty()) if (req.known_hashes.empty())
{
MERROR("sync_quick: req.known_hashes is empty");
return {lws::error::bad_blockchain}; return {lws::error::bad_blockchain};
}
auto resp = fetch_chain<rpc::get_hashes_fast>(self, client, "get_hashes_fast", req); auto resp = fetch_chain<rpc::get_hashes_fast>(self, client, "get_hashes_fast", req);
if (!resp) if (!resp)
@@ -1163,6 +1175,7 @@ namespace lws
if (resp->hashes.size() <= 1 || resp->hashes.back() == req.known_hashes.front()) if (resp->hashes.size() <= 1 || resp->hashes.back() == req.known_hashes.front())
return {std::move(client)}; return {std::move(client)};
MINFO("Syncing " << resp->hashes.size() << " hashes from height " << resp->start_height);
MONERO_CHECK(disk.sync_chain(db::block_id(resp->start_height), epee::to_span(resp->hashes), regtest)); MONERO_CHECK(disk.sync_chain(db::block_id(resp->start_height), epee::to_span(resp->hashes), regtest));
req.known_hashes.erase(req.known_hashes.begin(), --(req.known_hashes.end())); req.known_hashes.erase(req.known_hashes.begin(), --(req.known_hashes.end()));
@@ -1193,7 +1206,10 @@ namespace lws
for (;;) for (;;)
{ {
if (req.block_ids.empty()) if (req.block_ids.empty())
{
MERROR("sync_full: req.block_ids is empty");
return {lws::error::bad_blockchain}; return {lws::error::bad_blockchain};
}
auto resp = fetch_chain<rpc::get_blocks_fast>(self, client, "get_blocks_fast", req); auto resp = fetch_chain<rpc::get_blocks_fast>(self, client, "get_blocks_fast", req);
if (!resp) if (!resp)
@@ -1204,7 +1220,10 @@ namespace lws
crypto::hash hash{}; crypto::hash hash{};
if (!cryptonote::get_block_hash(resp->blocks.front().block, hash)) if (!cryptonote::get_block_hash(resp->blocks.front().block, hash))
{
MERROR("sync_full: failed to get hash of first block");
return {lws::error::bad_blockchain}; return {lws::error::bad_blockchain};
}
// //
// exit loop if it appears we have synced to top of chain // exit loop if it appears we have synced to top of chain
@@ -1243,11 +1262,17 @@ namespace lws
// important check, ensure we haven't deviated from chain // important check, ensure we haven't deviated from chain
if (block.prev_id != hash) if (block.prev_id != hash)
{
MERROR("sync_full: block.prev_id (" << block.prev_id << ") != hash (" << hash << ") at height " << std::uint64_t(height));
return {lws::error::bad_blockchain}; return {lws::error::bad_blockchain};
}
// compute block id hash // compute block id hash
if (!cryptonote::get_block_hash(block, hash)) if (!cryptonote::get_block_hash(block, hash))
{
MERROR("sync_full: failed to get hash of block at height " << std::uint64_t(height));
return {lws::error::bad_blockchain}; return {lws::error::bad_blockchain};
}
req.block_ids.push_front(hash); req.block_ids.push_front(hash);
update_window(pow_window.pow_timestamps); update_window(pow_window.pow_timestamps);
@@ -1260,7 +1285,7 @@ namespace lws
if (self.has_shutdown()) if (self.has_shutdown())
return {error::signal_abort_process}; return {error::signal_abort_process};
diff = cryptonote::next_difficulty(pow_window.pow_timestamps, pow_window.cumulative_diffs, get_target_time(height)); diff = cryptonote::next_difficulty(pow_window.pow_timestamps, pow_window.cumulative_diffs, get_target_time(height), std::uint64_t(height), lws::config::network);
// skip POW hashing when sync is within checkpoint // skip POW hashing when sync is within checkpoint
// storage::sync_pow(...) currently verifies checkpoint hashes // storage::sync_pow(...) currently verifies checkpoint hashes

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2020, The Monero Project # Copyright (c) 2020, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,8 +27,8 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-util_sources blocks.cpp gamma_picker.cpp random_outputs.cpp source_location.cpp transactions.cpp) set(wownero-lws-util_sources blocks.cpp gamma_picker.cpp random_outputs.cpp source_location.cpp transactions.cpp)
set(monero-lws-util_headers blocks.h fwd.h gamma_picker.h random_outputs.h source_location.h transactions.h) set(wownero-lws-util_headers blocks.h fwd.h gamma_picker.h random_outputs.h source_location.h transactions.h)
add_library(monero-lws-util ${monero-lws-util_sources} ${monero-lws-util_headers}) add_library(wownero-lws-util ${wownero-lws-util_sources} ${wownero-lws-util_headers})
target_link_libraries(monero-lws-util monero::libraries monero-lws-db) target_link_libraries(wownero-lws-util wownero::libraries wownero-lws-db)

View File

@@ -45,7 +45,7 @@ void lws::decrypt_payment_id(crypto::hash8& out, const crypto::key_derivation& k
out.data[b] ^= hash.data[b]; out.data[b] ^= hash.data[b];
} }
boost::optional<std::pair<std::uint64_t, rct::key>> lws::decode_amount(const rct::key& commitment, const rct::ecdhTuple& info, const crypto::key_derivation& sk, std::size_t index, const bool bulletproof2) boost::optional<std::pair<std::uint64_t, rct::key>> lws::decode_amount(const rct::key& commitment, const rct::ecdhTuple& info, const crypto::key_derivation& sk, std::size_t index, const bool bulletproof2, const std::uint8_t rct_type)
{ {
crypto::secret_key scalar{}; crypto::secret_key scalar{};
crypto::derivation_to_scalar(sk, index, scalar); crypto::derivation_to_scalar(sk, index, scalar);
@@ -55,7 +55,14 @@ boost::optional<std::pair<std::uint64_t, rct::key>> lws::decode_amount(const rct
rct::key Ctmp; rct::key Ctmp;
rct::addKeys2(Ctmp, copy.mask, copy.amount, rct::H); rct::addKeys2(Ctmp, copy.mask, copy.amount, rct::H);
if (rct::equalKeys(commitment, Ctmp))
// Wownero BulletproofPlus: commitments are stored in "divided by 8" form
// Must multiply by 8 (scalarmult8) before comparing
rct::key C = commitment;
if (rct_type == rct::RCTTypeBulletproofPlus)
C = rct::scalarmult8(C);
if (rct::equalKeys(C, Ctmp))
return {{rct::h2d(copy.amount), copy.mask}}; return {{rct::h2d(copy.amount), copy.mask}};
return boost::none; return boost::none;
} }

View File

@@ -41,5 +41,5 @@ namespace crypto
namespace lws namespace lws
{ {
void decrypt_payment_id(crypto::hash8& out, const crypto::key_derivation& key); void decrypt_payment_id(crypto::hash8& out, const crypto::key_derivation& key);
boost::optional<std::pair<std::uint64_t, rct::key>> decode_amount(const rct::key& commitment, const rct::ecdhTuple& info, const crypto::key_derivation& sk, std::size_t index, const bool bulletproof2); boost::optional<std::pair<std::uint64_t, rct::key>> decode_amount(const rct::key& commitment, const rct::ecdhTuple& info, const crypto::key_derivation& sk, std::size_t index, const bool bulletproof2, const std::uint8_t rct_type);
} }

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2020-2023, The Monero Project # Copyright (c) 2020-2023, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,12 +27,12 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-wire_sources error.cpp read.cpp write.cpp) set(wownero-lws-wire_sources error.cpp read.cpp write.cpp)
set(monero-lws-wire_headers error.h field.h filters.h fwd.h json.h read.h traits.h vector.h write.h) set(wownero-lws-wire_headers error.h field.h filters.h fwd.h json.h read.h traits.h vector.h write.h)
add_library(monero-lws-wire ${monero-lws-wire_sources} ${monero-lws-wire_headers}) add_library(wownero-lws-wire ${wownero-lws-wire_sources} ${wownero-lws-wire_headers})
target_include_directories(monero-lws-wire PUBLIC "${LMDB_INCLUDE}") target_include_directories(wownero-lws-wire PUBLIC "${LMDB_INCLUDE}")
target_link_libraries(monero-lws-wire PRIVATE monero::libraries) target_link_libraries(wownero-lws-wire PRIVATE wownero::libraries)
add_subdirectory(json) add_subdirectory(json)
add_subdirectory(msgpack) add_subdirectory(msgpack)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2020, The Monero Project # Copyright (c) 2020, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,8 +27,8 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws_wire-json_sources error.cpp read.cpp write.cpp) set(wownero-lws_wire-json_sources error.cpp read.cpp write.cpp)
set(monero-lws_wire-json_headers base.h error.h fwd.h read.h write.h) set(wownero-lws_wire-json_headers base.h error.h fwd.h read.h write.h)
add_library(monero-lws-wire-json ${monero-lws_wire-json_sources} ${monero-lws-wire-json_headers}) add_library(wownero-lws-wire-json ${wownero-lws_wire-json_sources} ${wownero-lws-wire-json_headers})
target_link_libraries(monero-lws-wire-json monero::libraries monero-lws-wire) target_link_libraries(wownero-lws-wire-json wownero::libraries wownero-lws-wire)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2023, The Monero Project # Copyright (c) 2023, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,8 +27,8 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws_wire-msgpack_sources error.cpp read.cpp write.cpp) set(wownero-lws_wire-msgpack_sources error.cpp read.cpp write.cpp)
set(monero-lws_wire-msgpack_headers base.h error.h fwd.h read.h write.h) set(wownero-lws_wire-msgpack_headers base.h error.h fwd.h read.h write.h)
add_library(monero-lws-wire-msgpack ${monero-lws_wire-msgpack_sources} ${monero-lws-wire-msgpack_headers}) add_library(wownero-lws-wire-msgpack ${wownero-lws_wire-msgpack_sources} ${wownero-lws-wire-msgpack_headers})
target_link_libraries(monero-lws-wire-msgpack monero::libraries monero-lws-wire) target_link_libraries(wownero-lws-wire-msgpack wownero::libraries wownero-lws-wire)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2020, The Monero Project # Copyright (c) 2020, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,10 +27,10 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(monero-lws-wire_sources variant.cpp) set(wownero-lws-wire_sources variant.cpp)
set(monero-lws-wire_headers variant.h) set(wownero-lws-wire_headers variant.h)
add_library(monero-lws-wire-wrapper ${monero-lws-wire_sources} ${monero-lws-wire_headers}) add_library(wownero-lws-wire-wrapper ${wownero-lws-wire_sources} ${wownero-lws-wire_headers})
target_include_directories(monero-lws-wire-wrapper PUBLIC "${LMDB_INCLUDE}") target_include_directories(wownero-lws-wire-wrapper PUBLIC "${LMDB_INCLUDE}")
target_link_libraries(monero-lws-wire-wrapper PRIVATE monero::libraries) target_link_libraries(wownero-lws-wire-wrapper PRIVATE wownero::libraries)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2022, The Monero Project # Copyright (c) 2022, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #

21
tests/test_wire_key.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include <iostream>
#include <string>
#include <vector>
#include "wire/json.h"
#include "wire/adapted/crypto.h"
#include "ringct/rctTypes.h"
int main() {
std::string json = "\"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20\"";
rct::key key;
try {
wire::json_reader reader{epee::as_byte_span(json)};
wire::read_bytes(reader, key);
std::cout << "Parsed key: ";
for (int i = 0; i < 32; ++i) printf("%02x", key.bytes[i]);
std::cout << std::endl;
} catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << std::endl;
}
return 0;
}

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2022, The Monero Project # Copyright (c) 2022, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,31 +27,31 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(monero-lws-unit-framework framework.test.cpp) add_library(wownero-lws-unit-framework framework.test.cpp)
target_include_directories(monero-lws-unit-framework PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/src") target_include_directories(wownero-lws-unit-framework PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/src")
target_link_libraries(monero-lws-unit-framework) target_link_libraries(wownero-lws-unit-framework)
add_subdirectory(db) add_subdirectory(db)
add_subdirectory(net) add_subdirectory(net)
add_subdirectory(rpc) add_subdirectory(rpc)
add_subdirectory(wire) add_subdirectory(wire)
add_executable(monero-lws-unit main.cpp rest.test.cpp scanner.test.cpp) add_executable(wownero-lws-unit main.cpp rest.test.cpp scanner.test.cpp)
target_link_libraries(monero-lws-unit target_link_libraries(wownero-lws-unit
monero::libraries wownero::libraries
monero-lws-daemon-common wownero-lws-daemon-common
monero-lws-unit-db wownero-lws-unit-db
monero-lws-unit-framework wownero-lws-unit-framework
monero-lws-unit-net wownero-lws-unit-net
monero-lws-unit-net-http wownero-lws-unit-net-http
monero-lws-unit-rpc wownero-lws-unit-rpc
monero-lws-unit-wire wownero-lws-unit-wire
monero-lws-unit-wire-json wownero-lws-unit-wire-json
monero-lws-unit-wire-msgpack wownero-lws-unit-wire-msgpack
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_THREAD_LIBRARY} ${Boost_THREAD_LIBRARY}
${Boost_THREAD_LIBS_INIT} ${Boost_THREAD_LIBS_INIT}
Threads::Threads Threads::Threads
) )
add_test(NAME monero-lws-unit COMMAND monero-lws-unit -v) add_test(NAME wownero-lws-unit COMMAND wownero-lws-unit -v)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2022-2023, The Monero Project # Copyright (c) 2022-2023, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,7 +27,7 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(monero-lws-unit-db OBJECT add_library(wownero-lws-unit-db OBJECT
account.test.cpp account.test.cpp
chain.test.cpp chain.test.cpp
data.test.cpp data.test.cpp
@@ -35,11 +36,11 @@ add_library(monero-lws-unit-db OBJECT
webhook.test.cpp webhook.test.cpp
) )
target_link_libraries( target_link_libraries(
monero-lws-unit-db wownero-lws-unit-db
monero-lws-unit-framework wownero-lws-unit-framework
monero-lws-common wownero-lws-common
monero-lws-db wownero-lws-db
monero::libraries wownero::libraries
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
) )
#add_test(monero-lws-unit) #add_test(wownero-lws-unit)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2024, The Monero Project # Copyright (c) 2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -28,5 +29,5 @@
add_subdirectory(http) add_subdirectory(http)
add_library(monero-lws-unit-net) add_library(wownero-lws-unit-net)
target_link_libraries(monero-lws-unit-net monero-lws-unit-net-http) target_link_libraries(wownero-lws-unit-net wownero-lws-unit-net-http)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2024, The Monero Project # Copyright (c) 2024, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,9 +27,9 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(monero-lws-unit-net-http OBJECT client.test.cpp) add_library(wownero-lws-unit-net-http OBJECT client.test.cpp)
target_link_libraries( target_link_libraries(
monero-lws-unit-net-http wownero-lws-unit-net-http
monero-lws-net-http wownero-lws-net-http
monero-lws-unit-framework wownero-lws-unit-framework
monero::libraries) wownero::libraries)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2022-2023, The Monero Project # Copyright (c) 2022-2023, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -26,15 +27,15 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(monero-lws-unit-rpc OBJECT admin.test.cpp) add_library(wownero-lws-unit-rpc OBJECT admin.test.cpp)
target_link_libraries( target_link_libraries(
monero-lws-unit-rpc wownero-lws-unit-rpc
monero-lws-unit-db wownero-lws-unit-db
monero-lws-unit-framework wownero-lws-unit-framework
monero-lws-common wownero-lws-common
monero-lws-db wownero-lws-db
monero-lws-rpc wownero-lws-rpc
monero-lws-wire-json wownero-lws-wire-json
monero::libraries wownero::libraries
) )
#add_test(monero-lws-unit) #add_test(wownero-lws-unit)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2022-2023, The Monero Project # Copyright (c) 2022-2023, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -30,11 +31,11 @@
add_subdirectory(json) add_subdirectory(json)
add_subdirectory(msgpack) add_subdirectory(msgpack)
add_library(monero-lws-unit-wire OBJECT read.write.test.cpp read.test.cpp) add_library(wownero-lws-unit-wire OBJECT read.write.test.cpp read.test.cpp)
target_link_libraries( target_link_libraries(
monero-lws-unit-wire wownero-lws-unit-wire
monero-lws-unit-framework wownero-lws-unit-framework
monero-lws-wire wownero-lws-wire
monero::libraries wownero::libraries
) )
#add_test(monero-lws-unit) #add_test(wownero-lws-unit)

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2022, The Monero Project # Copyright (c) 2022, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -27,11 +28,11 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(monero-lws-unit-wire-json OBJECT read.write.test.cpp) add_library(wownero-lws-unit-wire-json OBJECT read.write.test.cpp)
target_link_libraries( target_link_libraries(
monero-lws-unit-wire-json wownero-lws-unit-wire-json
monero-lws-unit-framework wownero-lws-unit-framework
monero-lws-wire-json wownero-lws-wire-json
monero::libraries wownero::libraries
) )

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2023, The Monero Project # Copyright (c) 2023, The Monero Project
# Copyright (c) 2024-2025, The Wownero Project
# #
# All rights reserved. # All rights reserved.
# #
@@ -27,11 +28,11 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_library(monero-lws-unit-wire-msgpack OBJECT read.write.test.cpp) add_library(wownero-lws-unit-wire-msgpack OBJECT read.write.test.cpp)
target_link_libraries( target_link_libraries(
monero-lws-unit-wire-msgpack wownero-lws-unit-wire-msgpack
monero-lws-unit-framework wownero-lws-unit-framework
monero-lws-wire-msgpack wownero-lws-wire-msgpack
monero::libraries wownero::libraries
) )