1
0
Fork 0
forked from lthn/blockchain
Commit graph

658 commits

Author SHA1 Message Date
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
Claude
7ee2265cae
fix: crypto test PRNG determinism, checkpoint hashes, and Zano address remnants
The crypto test PRNG was non-deterministic because setup_random() seeded
the state but grant_random_initialize_no_lock() overwrote it with
/dev/urandom on the first random call. Calling it before memset ensures
the initialized flag is set, preventing the overwrite.

Also adds --generate mode to crypto-tests for future vector regeneration,
updates checkpoint hashes for multisig_and_checkpoints (height 15) and
gen_no_attchments_in_coinbase (height 12), and replaces hardcoded Zano
addresses/URLs with Lethean equivalents in manual test scaffolding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:17:11 +00:00
sowle
3a9245f743
crypto::random refactoring and improvements (credits to @dimmarvel for spotting the thread safety issue) 2025-07-31 04:14:10 +03:00
sowle
96081db687
coretests: wallet_rpc_multiple_receivers -- work in progress 2025-07-26 02:26:08 +03:00
sowle
4923f644c4
coretests: minor improvements for wallet_rpc_cold_signing 2025-07-24 18:18:44 +03:00
sowle
d78911b344
Merge branch 'release' into develop
# Conflicts:
#	src/version.h.in
#	src/wallet/wallet_rpc_server.cpp
2025-07-24 18:04:36 +03:00
sowle
035f233bc7
transfer_so implemented +minor code cleanup 2025-07-24 05:25:17 +03:00
sowle
4618c240f2
Merge branch 'release' into develop
# Conflicts:
#	src/version.h.in
#	src/wallet/wallet_rpc_server.cpp
2025-07-23 13:22:24 +03:00
sowle
3e71f078ca
gcc warnings fixed 2025-07-22 21:47:22 +03:00
sowle
7a463d8065
coretests adapted to temp changes 2025-07-22 21:34:04 +03:00
cryptozoidberg
b0b30e20b2
sender/receiver disabled 2025-07-21 21:54:13 +04:00
Dmitry Matsiukhov
94c2e65dad
coretests: tx_coinbase_separate_sig_flag test added; (separate flag for PoW miner tx coinbase (#538))
* add tests for pow separate tx flag

* refactoring test, leave only poW validation
2025-07-19 15:49:10 +03:00
Dmitry Matsiukhov
4695229f2a
fix warnings (#546)
* fix warnings

* refactoring
2025-07-18 20:17:02 +03:00
sowle
ee883a690c
Merge branch 'release' into develop
# Conflicts:
#	src/wallet/wallet2.cpp
2025-07-17 15:39:00 +03:00
sowle
cac85721a2
wallet: minor improvements for balance() + coretest extended to cover more cases 2025-07-17 03:04:12 +03:00
sowle
fed84de8b7
compilation fix 2025-07-15 23:59:20 +03:00
Dmitry Matsiukhov
a08772ea6a
coretests: tx_input_mixins test added (test that will combine spending old coins and new coins in one tx and use mixins as 15)
* try to write test for 2 input with nmix

* one of incorrect version

* add test for input old/new

* refactoring and add comments

* delete garbage

* fix from vector variant to unordered_map

* add comment

* using to typedef
2025-07-15 23:36:53 +03:00
sowle
87cd247eb5
wallet: clear_utxo_cold_sig_reservation() made available only for watch-only wallets 2025-07-09 19:10:33 +03:00
sowle
0554d7b8c4
wallet: clear_utxo_cold_sig_reservation() implemented + RPC clear_utxo_cold_sig_reservation added + coretest wallet_rpc_cold_signing improved to test this new RPC 2025-07-09 17:16:01 +03:00
sowle
5ac8b20816
coretests: wallet_rpc_cold_signing test improved to cover key image recovery in a watch-only wallet using a full keys wallet 2025-07-09 14:41:22 +03:00
sowle
04364afc53
coretests: wallet_rpc_cold_signing test improved to cover asset transferring along with native coins (exposes a bug) 2025-07-08 02:44:05 +03:00
sowle
035a441efe
wallet2: dump_transfers now prints asset id instead of key images +typo fixed 2025-07-08 02:42:42 +03:00
Dmitry Matsiukhov
5340c6db32
coretests: test for miner tx with non-empty extra_nonce before and after HF4 (#532)
* try check extra nonce in miner_tx

* update c1

* write extra nonces, create pow pos block, checkers for exnonce, bug with HF4

* success check pos block

* correct pos/pos extra nonce validation for hf3+

* clean code, separate to methods, add template test, pos/pow extra nonce check in block

* delete logs

* back normal naming

* fix review comments
2025-06-27 20:16:24 +02:00
Dmitry Matsiukhov
ffa94febc6
coretests: block_choice_rule_bigger_fee test added (#530)
* add bigger fee block choice test

* fix block_validation

* remove c1, add check_top_block callback

* added more checks

* update test case

* delete: cmake fix for linux

* part of fixs

* add new check

* delete unused declareted

* add comments

* fix comment

* fix comments
2025-06-23 20:54:52 +02:00
sowle
46eab64834
rename: encrypt_attachments() -> encrypt_payload_items() + test gen_wallet_decrypted_attachments -> gen_wallet_decrypted_payload_items improved (tx_comment put in extra) 2025-06-20 01:30:00 +02:00
sowle
48176b6a72
chaingen: "clear_tx_pool" now clears tx pool indeed 2025-06-09 05:44:49 +02:00
sowle
2bb1113b43
core: HF4 coinage rule is not checked while adding a tx to the pool, letting it being confirmed later 2025-06-09 05:43:39 +02:00
sowle
2a13a63eb7
coretests: tx_pool_validation_and_chain_switch improved 2025-06-09 05:39:57 +02:00
sowle
c6b1a84461
Merge branch 'master' into develop 2025-06-03 01:58:12 +02:00
sowle
7eb6986f4d
txpool fixed: txs with too small max_related_block_height will wait in the pool till the current height is okay + coretests tx_pool_validation_and_chain_switch added 2025-06-03 00:01:11 +02:00
sowle
83234af5b6
coretests: wallet_rpc_cold_signing test added 2025-05-15 05:40:10 +03:00
sowle
92ea96a41d
coretests: set_playtime_test_wallet_options() minor refactoring 2025-05-15 05:39:34 +03:00
sowle
3abfd90e2f
asset ownership transfer refactoring (WIP) 2025-04-10 03:47:02 +03:00
sowle
745932738e
coretests: get_tx_version_and_harfork_id_from_events refactoring 2025-04-07 04:47:55 +03:00
sowle
df0171d989
coretests: set_use_assets_whitelisting(false) made default for wallets in coretests (2) 2025-04-03 18:27:43 +03:00
sowle
d3a2392cfa
coretests: set_use_assets_whitelisting(false) made default for wallets in coretests 2025-04-01 17:03:43 +03:00
sowle
68194dc60b
coretests: asset_operations_and_chain_switching added (finished) 2025-04-01 15:18:02 +03:00
sowle
fb0ba230ea
chaingen: improvements for fill_tx_sources, get_sources_total_amount to support assets more correctly 2025-04-01 05:48:22 +03:00
cryptozoidberg
ace2b4dbf5
tests for rpc transfer ownership done 2025-03-29 23:39:36 +04:00
cryptozoidberg
938050df0f
multiple fixes for wallet rpc api on_asset_send_ext_signed_tx on_attach_asset_descriptor and on_transfer_asset_ownership 2025-03-29 00:14:47 +04:00
cryptozoidberg
0662f9bbed
Merge branch 'develop' into rpc_extension 2025-03-28 18:09:38 +04:00
sowle
9a816a090d
coretests: asset_operations_and_chain_switching added (work is still in progress) 2025-03-27 03:46:05 +03:00
cryptozoidberg
be129f7a87
tests are work in progress 2025-03-24 02:36:54 +04:00
cryptozoidberg
64e2e53629
test for RPC API COMMAND_ATTACH_ASSET_DESCRIPTOR (in work) 2025-03-22 14:38:57 +04:00
cryptozoidberg
89e70c74cd
RPC extended for ownership transfer and attachment to wallet 2025-03-21 18:09:27 +04:00
sowle
e15a7f804e
coretests: asset_operation_and_hardfork_checks fixed to reflect recent changes in balance calculation 2025-03-07 22:26:34 +01:00
sowle
fca1194f55
coretests: assets_transfer_with_smallest_amount implemented (exposes a bug) 2025-03-06 14:23:01 +01:00
sowle
79e3c6eaf1
chaingen, wallet: improved wallet transfers listing and balance checking when an asset is specified 2025-03-06 14:21:59 +01:00
sowle
141a8eac6a
chaingen: zarcanum_in_alt_chain_2 (forgotten changes) 2025-02-14 03:22:31 +01:00
sowle
d8f12cdcc8
chaingen: zarcanum_in_alt_chain_2 test added (highlights an issue in alt block validation) 2025-02-14 03:20:23 +01:00