blockchain/src/config/default.cmake
Claude 467c64d015
feat: RandomX PoW, LWMA difficulty, stratum mining.* protocol, new genesis
Replace ProgPowZ with RandomX for ASIC-resistant proof-of-work. The
full dataset is initialized multi-threaded at startup with the key
"LetheanRandomXv1". Thread-local VMs are created on demand.

Switch difficulty algorithm from Zano's 720-block window to LWMA-1
(zawy12) with a 60-block window for much faster convergence after
hashrate changes. Target block time set to 10s for PoW.

Add standard stratum mining.* protocol handlers (subscribe, authorize,
submit, extranonce.subscribe) alongside existing EthProxy eth_*
handlers, with automatic protocol detection and mining.notify
translation for XMRig-based miners.

Generate fresh Lethean genesis block and premine wallet. Replace all
remaining hardcoded Zano addresses in tests with runtime-generated
keys to avoid prefix mismatches. Link RandomX library across all
build targets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:22:25 +00:00

50 lines
3.4 KiB
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tokenomics
set(coin 1000000000000 CACHE STRING "COIN" )
set(premine_amount 10000000000000000000 CACHE STRING "PREMINE_AMOUNT" )
set(tx_default_fee 10000000000 CACHE STRING "TX_DEFAULT_FEE" )
set(tx_minimum_fee 10000000000 CACHE STRING "TX_MINIMUM_FEE" )
set(currency_block_reward 1000000000000 CACHE STRING "CURRENCY_BLOCK_REWARD" )
set(currency_display_decimal_point 12 CACHE STRING "CURRENCY_DISPLAY_DECIMAL_POINT" )
# Chain Config
set(currency_name_abr "LTHN" CACHE STRING "CURRENCY_NAME_ABR" )
set(currency_name_base "Lethean" CACHE STRING "CURRENCY_NAME_BASE" )
set(currency_name_short_base "Lethean" CACHE STRING "CURRENCY_NAME_SHORT_BASE" )
# prefix is 'iT', non auditable wallets then use 'H', auditable wallets use 'h'; 'N' is a base addr, 'n' is a sub address,
set(address_prefix 0x1eaf7 CACHE STRING "CURRENCY_PUBLIC_ADDRESS_BASE58_PREFIX" ) # addresses start with 'iTHN'
set(address_prefix_integrated 0xdeaf7 CACHE STRING "CURRENCY_PUBLIC_INTEG_ADDRESS_V2_BASE58_PREFIX" ) # integrated addresses start with 'iTHn'
set(address_prefix_auditable 0x3ceff7 CACHE STRING "CURRENCY_PUBLIC_AUDITABLE_ADDRESS_BASE58_PREFIX" ) # auditable addresses start with 'iThN'
set(address_prefix_auditable_integrated 0x8b077 CACHE STRING "CURRENCY_PUBLIC_AUDITABLE_INTEG_ADDRESS_BASE58_PREFIX" ) # auditable integrated addresses start with 'iThn'
set(base_reward_dust_threshold 1000000 CACHE STRING "BASE_REWARD_DUST_THRESHOLD")
set(default_dust_threshold 0 CACHE STRING "DEFAULT_DUST_THRESHOLD" )
set(difficulty_pow_starter 1 CACHE STRING "DIFFICULTY_POW_STARTER" )
set(difficulty_pos_target 120 CACHE STRING "DIFFICULTY_POS_TARGET" )
set(difficulty_pow_target 10 CACHE STRING "DIFFICULTY_POW_TARGET" )
set(difficulty_window 720 CACHE STRING "DIFFICULTY_WINDOW" )
set(difficulty_lag 15 CACHE STRING "DIFFICULTY_LAG" )
set(difficulty_cut 60 CACHE STRING "DIFFICULTY_CUT" )
set(p2p_maintainers_pub_key "8f138bb73f6d663a3746a542770781a09579a7b84cb4125249e95530824ee607" CACHE STRING "P2P_MAINTAINERS_PUB_KEY" )
if (TESTNET)
set(p2p_default_port 36942 CACHE STRING "P2P_DEFAULT_PORT" )
set(rpc_default_port 36941 CACHE STRING "RPC_DEFAULT_PORT" )
set(stratum_default_port 36940 CACHE STRING "STRATUM_DEFAULT_PORT" )
set(package_name "lethean-testnet-cli" CACHE STRING "CPACK_PACKAGE_NAME" )
else ()
set(p2p_default_port 36942 CACHE STRING "P2P_DEFAULT_PORT" )
set(rpc_default_port 36941 CACHE STRING "RPC_DEFAULT_PORT" )
set(stratum_default_port 36940 CACHE STRING "STRATUM_DEFAULT_PORT" )
set(package_name "lethean-cli" CACHE STRING "CPACK_PACKAGE_NAME" )
endif ()
# installer config
set(package_vendor "Lethean Community" CACHE STRING "CPACK_PACKAGE_VENDOR" )
set(package_description "A privacypreserving blockchain node" CACHE STRING "CPACK_PACKAGE_DESCRIPTION_SUMMARY" )
set(package_version "${BUILD_VERSION}" CACHE STRING "CPACK_PACKAGE_VERSION" )
set(package_contact "support@lt.hn" CACHE STRING "CPACK_PACKAGE_CONTACT" )
set(package_website "https://github.com/letheanVPN/blockchain" CACHE STRING "CPACK_PACKAGE_HOMEPAGE_URL" )
set(package_macos_installer "PKG" CACHE STRING "CPACK_GENERATOR" )
set(package_macos_dmg_background "DMG" CACHE STRING "CPACK_DMG_BACKGROUND_IMAGE" )
set(package_macos_pkg_productbuild_identifier "com.lethean.blockchainnode" CACHE STRING "CPACK_PRODUCTBUILD_IDENTIFIER" )
set(package_macos_pkg_productbuild_signer "Developer ID Installer: Your Company (TEAMID)" CACHE STRING "CPACK_PRODUCTBUILD_SIGNING_IDENTITY" )