From dc87a9abeecf1277899ce104043ec250bb871bcd Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 9 Mar 2026 09:29:37 +0100 Subject: update monero to v0.18.4.6 --- ...issing-___clear_cache-when-targetting-iOS.patch | 8 +- patches/monero/0002-store-crash-fix.patch | 181 +++++++- .../0003-uint64_t-missing-definition-fix.patch | 8 +- ...004-use-proper-error-handling-in-get_seed.patch | 14 +- patches/monero/0005-UR-functions.patch | 49 +-- .../monero/0006-add-dummy-device-for-ledger.patch | 29 +- patches/monero/0007-polyseed.patch | 46 +- patches/monero/0008-coin-control.patch | 54 +-- ...oding-and-tx-key-getter-for-PendingTransc.patch | 8 +- ...dd-recoverDeterministicWalletFromSpendKey.patch | 10 +- .../monero/0011-add-monero-submodule-support.patch | 59 ++- patches/monero/0012-fix-iOS-depends-build.patch | 8 +- ...-include-locale-only-when-targeting-WIN32.patch | 12 +- .../0014-change-earliest-fork-height-message.patch | 10 +- .../0015-remove-trivially_copyable-assert.patch | 6 +- patches/monero/0016-pr-9880.patch | 25 -- .../0017-fix-unary_function-__unary_function.patch | 28 -- patches/monero/0018-serialize-cache-to-JSON.patch | 463 --------------------- ...enerate_translations_header.c-requirement.patch | 141 ------- ...s-remove-icu4c-monero-project-monero-8880.patch | 41 -- patches/monero/0021-fix-mingw-build-issues.patch | 46 -- patches/monero/0022-fix-remove-flaky-test.patch | 27 -- 22 files changed, 320 insertions(+), 953 deletions(-) delete mode 100644 patches/monero/0016-pr-9880.patch delete mode 100644 patches/monero/0017-fix-unary_function-__unary_function.patch delete mode 100644 patches/monero/0018-serialize-cache-to-JSON.patch delete mode 100644 patches/monero/0019-drop-generate_translations_header.c-requirement.patch delete mode 100644 patches/monero/0020-depends-remove-icu4c-monero-project-monero-8880.patch delete mode 100644 patches/monero/0021-fix-mingw-build-issues.patch delete mode 100644 patches/monero/0022-fix-remove-flaky-test.patch (limited to 'patches') diff --git a/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch index d11f005..888a502 100644 --- a/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch +++ b/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch @@ -1,7 +1,7 @@ -From 36259ba9f88bc135b243329400bec9290abb04c6 Mon Sep 17 00:00:00 2001 +From 41d9f755a1392dd116241acb32b887091669f090 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 2 Apr 2024 16:51:56 +0200 -Subject: [PATCH 01/17] fix missing ___clear_cache when targetting iOS +Subject: [PATCH 01/20] fix missing ___clear_cache when targetting iOS --- .gitmodules | 3 ++- @@ -23,12 +23,12 @@ index 721cce3b4..ffb73fe9a 100644 path = external/supercop url = https://github.com/monero-project/supercop diff --git a/external/randomx b/external/randomx -index 102f8acf9..ce72c9bb9 160000 +index 102f8acf9..5dfeeb30e 160000 --- a/external/randomx +++ b/external/randomx @@ -1 +1 @@ -Subproject commit 102f8acf90a7649ada410de5499a7ec62e49e1da +Subproject commit 5dfeeb30ec3446ec9d348153767abc324436c56c -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0002-store-crash-fix.patch b/patches/monero/0002-store-crash-fix.patch index a09dcf1..0c4839d 100644 --- a/patches/monero/0002-store-crash-fix.patch +++ b/patches/monero/0002-store-crash-fix.patch @@ -1,7 +1,7 @@ -From 459ac9f7a64cc527528a41dc45ed4cefe83091cb Mon Sep 17 00:00:00 2001 +From 94cf21261079d6d4ceb848be3863613e98c3bc89 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Sat, 11 May 2024 16:25:10 +0200 -Subject: [PATCH 02/17] store crash fix +Subject: [PATCH 02/20] store crash fix Monero wallet crashes (sometimes) when it is syncing, while the proper solution (that can be seen in feather) @@ -36,14 +36,22 @@ would just wait for it to finish before actually storing). Also imo store() functin should store the wallet, no matter the current state. --- - src/wallet/api/wallet.cpp | 25 ++++++++++++------------- + external/randomx | 2 +- + src/wallet/api/wallet.cpp | 53 +++++++++++++++++++-------------------- src/wallet/api/wallet.h | 1 - - src/wallet/wallet2.cpp | 11 ++++++++++- + src/wallet/wallet2.cpp | 11 +++++++- src/wallet/wallet2.h | 3 +++ - 4 files changed, 25 insertions(+), 15 deletions(-) + 5 files changed, 40 insertions(+), 30 deletions(-) +diff --git a/external/randomx b/external/randomx +index 5dfeeb30e..102f8acf9 160000 +--- a/external/randomx ++++ b/external/randomx +@@ -1 +1 @@ +-Subproject commit 5dfeeb30ec3446ec9d348153767abc324436c56c ++Subproject commit 102f8acf90a7649ada410de5499a7ec62e49e1da diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 8fda0bab7..67b170e3d 100644 +index 165b21c9f..c2f4176e2 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -55,8 +55,8 @@ using namespace cryptonote; @@ -57,6 +65,33 @@ index 8fda0bab7..67b170e3d 100644 m_wallet->stop(); \ m_refreshCV.notify_one(); \ boost::mutex::scoped_lock lock(m_refreshMutex); \ +@@ -178,7 +178,7 @@ struct Wallet2CallbackImpl : public tools::i_wallet2_callback + virtual void on_new_block(uint64_t height, const cryptonote::block& block) + { + // Don't flood the GUI with signals. On fast refresh - send signal every 1000th block +- // get_refresh_from_block_height() returns the blockheight from when the wallet was ++ // get_refresh_from_block_height() returns the blockheight from when the wallet was + // created or the restore height specified when wallet was recovered + if(height >= m_wallet->m_wallet->get_refresh_from_block_height() || height % 1000 == 0) { + // LOG_PRINT_L3(__FUNCTION__ << ": new block. height: " << height); +@@ -379,7 +379,7 @@ bool Wallet::keyValid(const std::string &secret_key_string, const std::string &a + error = tr("Failed to parse address"); + return false; + } +- ++ + cryptonote::blobdata key_data; + if(!epee::string_tools::parse_hexstr_to_binbuff(secret_key_string, key_data) || key_data.size() != sizeof(crypto::secret_key)) + { +@@ -404,7 +404,7 @@ bool Wallet::keyValid(const std::string &secret_key_string, const std::string &a + error = tr("key does not match address"); + return false; + } +- ++ + return true; + } + @@ -466,7 +466,7 @@ WalletImpl::WalletImpl(NetworkType nettype, uint64_t kdf_rounds) m_wallet2Callback.reset(new Wallet2CallbackImpl(this)); m_wallet->callback(m_wallet2Callback.get()); @@ -66,6 +101,24 @@ index 8fda0bab7..67b170e3d 100644 m_addressBook.reset(new AddressBookImpl(this)); m_subaddress.reset(new SubaddressImpl(this)); m_subaddressAccount.reset(new SubaddressAccountImpl(this)); +@@ -487,7 +487,7 @@ WalletImpl::~WalletImpl() + m_wallet->callback(NULL); + // Pause refresh thread - prevents refresh from starting again + WalletImpl::pauseRefresh(); // Call the method directly (not polymorphically) to protect against UB in destructor. +- // Close wallet - stores cache and stops ongoing refresh operation ++ // Close wallet - stores cache and stops ongoing refresh operation + close(false); // do not store wallet as part of the closing activities + // Stop refresh thread + stopRefresh(); +@@ -698,7 +698,7 @@ bool WalletImpl::recoverFromKeysWithPassword(const std::string &path, + setSeedLanguage(language); + LOG_PRINT_L1("Generated deterministic wallet from spend key with seed language: " + language); + } +- ++ + } + catch (const std::exception& e) { + setStatusError(string(tr("failed to generate new wallet: ")) + e.what()); @@ -962,6 +962,7 @@ void WalletImpl::stop() bool WalletImpl::store(const std::string &path) { @@ -74,6 +127,76 @@ index 8fda0bab7..67b170e3d 100644 try { if (path.empty()) { m_wallet->store(); +@@ -1110,14 +1111,14 @@ uint64_t WalletImpl::daemonBlockChainTargetHeight() const + } else { + clearStatus(); + } +- // Target height can be 0 when daemon is synced. Use blockchain height instead. ++ // Target height can be 0 when daemon is synced. Use blockchain height instead. + if(result == 0) + result = daemonBlockChainHeight(); + return result; + } + + bool WalletImpl::daemonSynced() const +-{ ++{ + if(connected() == Wallet::ConnectionStatus_Disconnected) + return false; + uint64_t blockChainHeight = daemonBlockChainHeight(); +@@ -1189,14 +1190,14 @@ UnsignedTransaction *WalletImpl::loadUnsignedTx(const std::string &unsigned_file + + return transaction; + } +- ++ + // Check tx data and construct confirmation message + std::string extra_message; + if (!std::get<2>(transaction->m_unsigned_tx_set.transfers).empty()) + extra_message = (boost::format("%u outputs to import. ") % (unsigned)std::get<2>(transaction->m_unsigned_tx_set.transfers).size()).str(); + transaction->checkLoadedTx([&transaction](){return transaction->m_unsigned_tx_set.txes.size();}, [&transaction](size_t n)->const tools::wallet2::tx_construction_data&{return transaction->m_unsigned_tx_set.txes[n];}, extra_message); + setStatus(transaction->status(), transaction->errorString()); +- ++ + return transaction; + } + +@@ -1211,7 +1212,7 @@ bool WalletImpl::submitTransaction(const string &fileName) { + setStatus(Status_Ok, tr("Failed to load transaction from file")); + return false; + } +- ++ + if(!transaction->commit()) { + setStatusError(transaction->m_errorString); + return false; +@@ -1220,7 +1221,7 @@ bool WalletImpl::submitTransaction(const string &fileName) { + return true; + } + +-bool WalletImpl::exportKeyImages(const string &filename, bool all) ++bool WalletImpl::exportKeyImages(const string &filename, bool all) + { + if (m_wallet->watch_only()) + { +@@ -1229,7 +1230,7 @@ bool WalletImpl::exportKeyImages(const string &filename, bool all) + } + if (checkBackgroundSync("cannot export key images")) + return false; +- ++ + try + { + if (!m_wallet->export_key_images(filename, all)) +@@ -1664,7 +1665,7 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vectoradjust_priority(static_cast(priority)); @@ -2448,10 +2449,10 @@ void WalletImpl::refreshThreadFunc() } @@ -87,13 +210,7 @@ index 8fda0bab7..67b170e3d 100644 LOG_PRINT_L3(__FUNCTION__ << ": refreshing..."); doRefresh(); } -@@ -2481,12 +2482,12 @@ void WalletImpl::doRefresh() - } - m_wallet->find_and_save_rings(false); - } else { -- LOG_PRINT_L3(__FUNCTION__ << ": skipping refresh - daemon is not synced"); -+ LOG_PRINT_L3(__FUNCTION__ << ": skipping refresh - daemon is not synced"); - } +@@ -2485,7 +2486,7 @@ void WalletImpl::doRefresh() } catch (const std::exception &e) { setStatusError(e.what()); break; @@ -102,7 +219,7 @@ index 8fda0bab7..67b170e3d 100644 if (m_wallet2Callback->getListener()) { m_wallet2Callback->getListener()->refreshed(); -@@ -2496,9 +2497,9 @@ void WalletImpl::doRefresh() +@@ -2495,9 +2496,9 @@ void WalletImpl::doRefresh() void WalletImpl::startRefresh() { @@ -114,7 +231,7 @@ index 8fda0bab7..67b170e3d 100644 m_refreshCV.notify_one(); } } -@@ -2508,7 +2509,7 @@ void WalletImpl::startRefresh() +@@ -2507,7 +2508,7 @@ void WalletImpl::startRefresh() void WalletImpl::stopRefresh() { if (!m_refreshThreadDone) { @@ -123,7 +240,7 @@ index 8fda0bab7..67b170e3d 100644 m_refreshThreadDone = true; m_refreshCV.notify_one(); m_refreshThread.join(); -@@ -2519,9 +2520,7 @@ void WalletImpl::pauseRefresh() +@@ -2518,9 +2519,7 @@ void WalletImpl::pauseRefresh() { LOG_PRINT_L2(__FUNCTION__ << ": refresh paused..."); // TODO synchronize access @@ -134,6 +251,24 @@ index 8fda0bab7..67b170e3d 100644 } +@@ -2530,7 +2529,7 @@ bool WalletImpl::isNewWallet() const + // it's the same case as if it created from scratch, i.e. we need "fast sync" + // with the daemon (pull hashes instead of pull blocks). + // If wallet cache is rebuilt, creation height stored in .keys is used. +- // Watch only wallet is a copy of an existing wallet. ++ // Watch only wallet is a copy of an existing wallet. + return !(blockChainHeight() > 1 || m_recoveringFromSeed || m_recoveringFromDevice || m_rebuildWalletCache) && !watchOnly(); + } + +@@ -2642,7 +2641,7 @@ void WalletImpl::hardForkInfo(uint8_t &version, uint64_t &earliest_height) const + m_wallet->get_hard_fork_info(version, earliest_height); + } + +-bool WalletImpl::useForkRules(uint8_t version, int64_t early_blocks) const ++bool WalletImpl::useForkRules(uint8_t version, int64_t early_blocks) const + { + return m_wallet->use_fork_rules(version,early_blocks); + } diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 1f199a72c..ac7ce2f6a 100644 --- a/src/wallet/api/wallet.h @@ -147,10 +282,10 @@ index 1f199a72c..ac7ce2f6a 100644 std::atomic m_refreshIntervalMillis; std::atomic m_refreshShouldRescan; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index dfb8b23cb..c9c2dbc82 100644 +index af1f03d2c..af876c9f3 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp -@@ -1192,6 +1192,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std +@@ -1195,6 +1195,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std m_upper_transaction_weight_limit(0), m_run(true), m_callback(0), @@ -158,7 +293,7 @@ index dfb8b23cb..c9c2dbc82 100644 m_trusted_daemon(false), m_nettype(nettype), m_multisig_rounds_passed(0), -@@ -1412,6 +1413,14 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optionalset_proxy(address); -@@ -4107,7 +4116,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo +@@ -4178,7 +4187,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo // infer when we get an incoming output bool first = true, last = false; @@ -183,7 +318,7 @@ index dfb8b23cb..c9c2dbc82 100644 uint64_t next_blocks_start_height; std::vector next_blocks; diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index 2f4ad52f1..daad1e940 100644 +index a765dc475..92f735f96 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1078,6 +1078,8 @@ private: @@ -195,7 +330,7 @@ index 2f4ad52f1..daad1e940 100644 void stop() { m_run.store(false, std::memory_order_relaxed); m_message_store.stop(); } -@@ -1989,6 +1991,7 @@ private: +@@ -1997,6 +1999,7 @@ private: boost::recursive_mutex m_daemon_rpc_mutex; @@ -204,5 +339,5 @@ index 2f4ad52f1..daad1e940 100644 i_wallet2_callback* m_callback; hw::device::device_type m_key_device_type; -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0003-uint64_t-missing-definition-fix.patch b/patches/monero/0003-uint64_t-missing-definition-fix.patch index 70ce8bf..87aef72 100644 --- a/patches/monero/0003-uint64_t-missing-definition-fix.patch +++ b/patches/monero/0003-uint64_t-missing-definition-fix.patch @@ -1,14 +1,14 @@ -From c51ee39835aaac64da39b1c10bc068182f6e28cb Mon Sep 17 00:00:00 2001 +From 3cdb4ef9bdf88936276b4c5286eb7f9d39f556d0 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 2 Sep 2024 16:40:31 +0200 -Subject: [PATCH 03/17] uint64_t missing definition fix +Subject: [PATCH 03/20] uint64_t missing definition fix --- contrib/epee/include/net/http_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/epee/include/net/http_base.h b/contrib/epee/include/net/http_base.h -index 4af4da790..ae4c0d05e 100644 +index f32fdd9ae..a95a7d34f 100644 --- a/contrib/epee/include/net/http_base.h +++ b/contrib/epee/include/net/http_base.h @@ -28,7 +28,7 @@ @@ -21,5 +21,5 @@ index 4af4da790..ae4c0d05e 100644 #include -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0004-use-proper-error-handling-in-get_seed.patch b/patches/monero/0004-use-proper-error-handling-in-get_seed.patch index aa30e4f..154fa90 100644 --- a/patches/monero/0004-use-proper-error-handling-in-get_seed.patch +++ b/patches/monero/0004-use-proper-error-handling-in-get_seed.patch @@ -1,7 +1,7 @@ -From 0c1524dd9a4f6b4450b277623ffa620f69931102 Mon Sep 17 00:00:00 2001 +From 9174c5ab87a00d16e2930616686de5e57f3e7539 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 24 Jun 2024 10:49:12 +0200 -Subject: [PATCH 04/17] use proper error handling in get_seed +Subject: [PATCH 04/20] use proper error handling in get_seed --- src/wallet/api/wallet.cpp | 17 ++++++++++++----- @@ -9,7 +9,7 @@ Subject: [PATCH 04/17] use proper error handling in get_seed 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 67b170e3d..89df5c517 100644 +index c2f4176e2..6301bd1ef 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -826,12 +826,19 @@ bool WalletImpl::close(bool store) @@ -38,10 +38,10 @@ index 67b170e3d..89df5c517 100644 std::string WalletImpl::getSeedLanguage() const diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index c9c2dbc82..b827b826f 100644 +index af876c9f3..ac2a1fec3 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp -@@ -1449,11 +1449,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab +@@ -1452,11 +1452,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab bool keys_deterministic = is_deterministic(); if (!keys_deterministic) { @@ -55,7 +55,7 @@ index c9c2dbc82..b827b826f 100644 std::cout << "seed_language not set" << std::endl; return false; } -@@ -1463,8 +1465,9 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab +@@ -1466,8 +1468,9 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab key = cryptonote::encrypt_key(key, passphrase); if (!crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language)) { @@ -67,5 +67,5 @@ index c9c2dbc82..b827b826f 100644 return true; -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0005-UR-functions.patch b/patches/monero/0005-UR-functions.patch index 0ba79b7..116d050 100644 --- a/patches/monero/0005-UR-functions.patch +++ b/patches/monero/0005-UR-functions.patch @@ -1,7 +1,7 @@ -From 467ee9154b5c1b903559bf1dbe848cbabc62ba7d Mon Sep 17 00:00:00 2001 +From ccd02185be7d4a928776ff38111eb3ce9face61f Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 10:09:50 +0100 -Subject: [PATCH 05/17] UR functions +Subject: [PATCH 05/20] UR functions This commit adds UR functions for UR tasks, I believe that the right place to get @@ -29,12 +29,12 @@ Things broken in the commit src/wallet/api/pending_transaction.h | 1 + src/wallet/api/unsigned_transaction.cpp | 42 ++++ src/wallet/api/unsigned_transaction.h | 1 + - src/wallet/api/wallet.cpp | 309 +++++++++++++++++++++++- + src/wallet/api/wallet.cpp | 307 ++++++++++++++++++++++++ src/wallet/api/wallet.h | 8 + src/wallet/api/wallet2_api.h | 22 +- src/wallet/wallet2.cpp | 141 +++++++---- src/wallet/wallet2.h | 3 + - 15 files changed, 519 insertions(+), 57 deletions(-) + 15 files changed, 518 insertions(+), 56 deletions(-) create mode 160000 external/bc-ur diff --git a/.gitmodules b/.gitmodules @@ -50,7 +50,7 @@ index ffb73fe9a..72af74d55 100644 + url = https://github.com/MrCyjaneK/bc-ur + branch = misc diff --git a/CMakeLists.txt b/CMakeLists.txt -index db69b1b04..c73b813d8 100644 +index 9b922046e..268339201 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,7 +96,8 @@ enable_language(C ASM) @@ -89,7 +89,7 @@ index 000000000..d82e7c753 @@ -0,0 +1 @@ +Subproject commit d82e7c753e710b8000706dc3383b498438795208 diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp -index 5d0afe1ee..bb5b6f497 100644 +index 6dde4a564..7e4be6347 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -313,12 +313,13 @@ namespace hw { @@ -256,7 +256,7 @@ index 30065a7fa..a94b23f75 100644 uint64_t minMixinCount() const override; diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 89df5c517..3fcd6f332 100644 +index 6301bd1ef..d179e502b 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -47,6 +47,7 @@ @@ -354,15 +354,6 @@ index 89df5c517..3fcd6f332 100644 bool WalletImpl::submitTransaction(const string &fileName) { clearStatus(); if (checkBackgroundSync("cannot submit tx")) -@@ -1219,7 +1293,7 @@ bool WalletImpl::submitTransaction(const string &fileName) { - setStatus(Status_Ok, tr("Failed to load transaction from file")); - return false; - } -- -+ - if(!transaction->commit()) { - setStatusError(transaction->m_errorString); - return false; @@ -1228,6 +1302,61 @@ bool WalletImpl::submitTransaction(const string &fileName) { return true; } @@ -422,7 +413,7 @@ index 89df5c517..3fcd6f332 100644 + return m_wallet->has_unknown_key_images(); +} + - bool WalletImpl::exportKeyImages(const string &filename, bool all) + bool WalletImpl::exportKeyImages(const string &filename, bool all) { if (m_wallet->watch_only()) @@ -1255,6 +1384,39 @@ bool WalletImpl::exportKeyImages(const string &filename, bool all) @@ -754,10 +745,10 @@ index e349df176..764adbfbf 100644 /*! * \brief scanTransactions - scan a list of transaction ids, this operation may reveal the txids to the remote node and affect your privacy diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index b827b826f..765cefb32 100644 +index ac2a1fec3..a8db99c3f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp -@@ -948,6 +948,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra) +@@ -953,6 +953,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra) return idx + extra; } @@ -774,7 +765,7 @@ index b827b826f..765cefb32 100644 static void setup_shim(hw::wallet_shim * shim, tools::wallet2 * wallet) { shim->get_tx_pub_key_from_received_outs = std::bind(&tools::wallet2::get_tx_pub_key_from_received_outs, wallet, std::placeholders::_1); -@@ -6997,6 +7007,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t * +@@ -7065,6 +7075,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t * return amount; } //---------------------------------------------------------------------------------------------------- @@ -800,7 +791,7 @@ index b827b826f..765cefb32 100644 std::map wallet2::balance_per_subaddress(uint32_t index_major, bool strict) const { std::map amount_per_subaddr; -@@ -7848,9 +7877,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector additional_derivations; @@ -811,7 +802,7 @@ index b827b826f..765cefb32 100644 std::vector additional_tx_pub_keys; for (const crypto::secret_key &skey: txs[n].additional_tx_keys) { -@@ -11246,7 +11273,7 @@ std::vector wallet2::create_transactions_2(std::vector wallet2::create_transactions_2(std::vector m_ignore_outputs_above || td.amount() < m_ignore_outputs_below) { -@@ -11296,9 +11323,15 @@ std::vector wallet2::create_transactions_2(std::vector wallet2::create_transactions_2(std::vector>> wallet2::export_key_images(bool all) const { -@@ -14015,53 +14055,60 @@ std::pair> +@@ -14030,53 +14070,60 @@ std::pair> return std::make_pair(offset, ski); } @@ -982,10 +973,10 @@ index b827b826f..765cefb32 100644 ski.push_back(std::make_pair(key_image, signature)); } diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index daad1e940..a752f15b9 100644 +index 92f735f96..18e60d89a 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h -@@ -1157,6 +1157,7 @@ private: +@@ -1164,6 +1164,7 @@ private: // locked & unlocked balance of given or current subaddress account uint64_t balance(uint32_t subaddr_index_major, bool strict) const; uint64_t unlocked_balance(uint32_t subaddr_index_major, bool strict, uint64_t *blocks_to_unlock = NULL, uint64_t *time_to_unlock = NULL); @@ -993,7 +984,7 @@ index daad1e940..a752f15b9 100644 // locked & unlocked balance per subaddress of given or current subaddress account std::map balance_per_subaddress(uint32_t subaddr_index_major, bool strict) const; std::map>> unlocked_balance_per_subaddress(uint32_t subaddr_index_major, bool strict); -@@ -1631,9 +1632,11 @@ private: +@@ -1639,9 +1640,11 @@ private: std::tuple> export_blockchain() const; void import_blockchain(const std::tuple> &bc); bool export_key_images(const std::string &filename, bool all = false) const; @@ -1006,5 +997,5 @@ index daad1e940..a752f15b9 100644 bool import_key_images(signed_tx_set & signed_tx, size_t offset=0, bool only_selected_transfers=false); crypto::public_key get_tx_pub_key_from_received_outs(const tools::wallet2::transfer_details &td) const; -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0006-add-dummy-device-for-ledger.patch b/patches/monero/0006-add-dummy-device-for-ledger.patch index 30261a4..816ad5d 100644 --- a/patches/monero/0006-add-dummy-device-for-ledger.patch +++ b/patches/monero/0006-add-dummy-device-for-ledger.patch @@ -1,11 +1,10 @@ -From 11ddba5ab1470fb46a87ea9b702bf11f88763ecc Mon Sep 17 00:00:00 2001 +From eb9ffa912fb31dd2bddf96d7d55d5e5f9d8219b4 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 8 May 2025 13:14:23 +0200 -Subject: [PATCH 06/17] add dummy device for ledger +Subject: [PATCH 06/20] add dummy device for ledger --- - CMakeLists.txt | 6 +- - external/randomx | 2 +- + CMakeLists.txt | 19 ++-- src/device/CMakeLists.txt | 6 +- src/device/device.cpp | 10 +- src/device/device.hpp | 12 +-- @@ -17,12 +16,12 @@ Subject: [PATCH 06/17] add dummy device for ledger src/wallet/api/wallet.h | 14 +++ src/wallet/api/wallet2_api.h | 13 +++ src/wallet/api/wallet_manager.cpp | 12 ++- - 13 files changed, 405 insertions(+), 26 deletions(-) + 12 files changed, 411 insertions(+), 31 deletions(-) create mode 100644 src/device/device_io_dummy.cpp create mode 100644 src/device/device_io_dummy.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt -index c73b813d8..ce5ef4bab 100644 +index 268339201..eb0d12225 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -692,16 +692,21 @@ include_directories(${LMDB_INCLUDE}) @@ -147,7 +146,7 @@ index 392703a24..ffd419779 100644 diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp new file mode 100644 -index 000000000..01e6fc7b7 +index 000000000..74742150d --- /dev/null +++ b/src/device/device_io_dummy.cpp @@ -0,0 +1,161 @@ @@ -315,7 +314,7 @@ index 000000000..01e6fc7b7 \ No newline at end of file diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp new file mode 100644 -index 000000000..1128b9c1d +index 000000000..87a5f109f --- /dev/null +++ b/src/device/device_io_dummy.hpp @@ -0,0 +1,82 @@ @@ -402,7 +401,7 @@ index 000000000..1128b9c1d + +#endif // HAVE_HIDAPI diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp -index bb5b6f497..046201a1e 100644 +index 7e4be6347..ee330ba59 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -41,7 +41,7 @@ namespace hw { @@ -423,7 +422,7 @@ index bb5b6f497..046201a1e 100644 this->mode = NONE; this->has_view_key = false; this->tx_in_progress = false; -@@ -533,7 +533,9 @@ namespace hw { +@@ -534,7 +534,9 @@ namespace hw { bool device_ledger::connect(void) { this->disconnect(); @@ -434,7 +433,7 @@ index bb5b6f497..046201a1e 100644 #ifdef DEBUG_HWDEVICE cryptonote::account_public_address pubkey; diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp -index 03058c4f1..39454ca6d 100644 +index 61ac6f9c8..44a1af6c8 100644 --- a/src/device/device_ledger.hpp +++ b/src/device/device_ledger.hpp @@ -35,6 +35,7 @@ @@ -467,7 +466,7 @@ index 03058c4f1..39454ca6d 100644 unsigned char buffer_send[BUFFER_SEND_SIZE]; unsigned int length_recv; diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 3fcd6f332..844a1c451 100644 +index d179e502b..fb71a0521 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -48,6 +48,9 @@ @@ -480,7 +479,7 @@ index 3fcd6f332..844a1c451 100644 using namespace std; using namespace cryptonote; -@@ -3178,4 +3181,101 @@ uint64_t WalletImpl::getBytesSent() +@@ -3177,4 +3180,101 @@ uint64_t WalletImpl::getBytesSent() return m_wallet->get_bytes_sent(); } @@ -608,7 +607,7 @@ index edf8bb8ce..6bfb61cb8 100644 diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index 764adbfbf..a48a6be54 100644 +index 764adbfbf..f433b064f 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -1150,6 +1150,19 @@ struct Wallet @@ -655,5 +654,5 @@ index e81b8f83a..277be6ac9 100644 std::vector WalletManagerImpl::findWallets(const std::string &path) -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0007-polyseed.patch b/patches/monero/0007-polyseed.patch index e83678e..5caf7c2 100644 --- a/patches/monero/0007-polyseed.patch +++ b/patches/monero/0007-polyseed.patch @@ -1,7 +1,7 @@ -From 3c3d441cabcaae9eb5d3db2f5cd6c506feb97168 Mon Sep 17 00:00:00 2001 +From da0be39a81107060f032c8242c575f04ad61c59f Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 09:42:37 +0100 -Subject: [PATCH 07/17] polyseed +Subject: [PATCH 07/20] polyseed Co-authored-by: Czarek Nakamoto --- @@ -56,7 +56,7 @@ index 72af74d55..b838e84e0 100644 path = external/supercop url = https://github.com/monero-project/supercop diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c0f31cb8..f0630ef9b 100644 +index eb0d12225..390339523 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,6 +371,8 @@ if(NOT MANUAL_SUBMODULES) @@ -814,7 +814,7 @@ index 000000000..2c8c777a7 +#endif //POLYSEED_HPP \ No newline at end of file diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 844a1c451..050212ff7 100644 +index fb71a0521..17a98c066 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -728,6 +728,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p @@ -926,7 +926,7 @@ index 6bfb61cb8..e7873dd78 100644 void setSeedLanguage(const std::string &arg) override; // void setListener(Listener *) {} diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index a48a6be54..8fa0bbd42 100644 +index f433b064f..80bfdacb2 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -709,6 +709,10 @@ struct Wallet @@ -1010,7 +1010,7 @@ index a223e1df9..28fcd36c9 100644 bool walletExists(const std::string &path) override; bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds = 1) const override; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index 765cefb32..806de969a 100644 +index a8db99c3f..972310343 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -92,6 +92,7 @@ using namespace epee; @@ -1021,7 +1021,7 @@ index 765cefb32..806de969a 100644 extern "C" { -@@ -1278,7 +1279,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std +@@ -1281,7 +1282,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std m_enable_multisig(false), m_pool_info_query_time(0), m_has_ever_refreshed_from_node(false), @@ -1031,7 +1031,7 @@ index 765cefb32..806de969a 100644 { set_rpc_client_secret_key(rct::rct2sk(rct::skGen())); } -@@ -1483,6 +1485,20 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab +@@ -1486,6 +1488,20 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab return true; } //---------------------------------------------------------------------------------------------------- @@ -1052,7 +1052,7 @@ index 765cefb32..806de969a 100644 bool wallet2::get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase) const { bool ready; -@@ -4800,6 +4816,9 @@ boost::optional wallet2::get_keys_file_data(const crypt +@@ -4877,6 +4893,9 @@ boost::optional wallet2::get_keys_file_data(const crypt value2.SetInt(m_enable_multisig ? 1 : 0); json.AddMember("enable_multisig", value2, json.GetAllocator()); @@ -1062,7 +1062,7 @@ index 765cefb32..806de969a 100644 if (m_background_sync_type == BackgroundSyncCustomPassword && !background_keys_file && m_custom_background_key) { value.SetString(reinterpret_cast(m_custom_background_key.get().data()), m_custom_background_key.get().size()); -@@ -5039,6 +5058,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st +@@ -5116,6 +5135,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st m_enable_multisig = false; m_allow_mismatched_daemon_version = false; m_custom_background_key = boost::none; @@ -1070,7 +1070,7 @@ index 765cefb32..806de969a 100644 } else if(json.IsObject()) { -@@ -5279,6 +5299,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st +@@ -5356,6 +5376,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, background_sync_type, BackgroundSyncType, Int, false, BackgroundSyncOff); m_background_sync_type = field_background_sync_type; @@ -1080,7 +1080,7 @@ index 765cefb32..806de969a 100644 // Load encryption key used to encrypt background cache crypto::chacha_key custom_background_key; m_custom_background_key = boost::none; -@@ -5598,6 +5621,48 @@ void wallet2::init_type(hw::device::device_type device_type) +@@ -5675,6 +5698,48 @@ void wallet2::init_type(hw::device::device_type device_type) m_key_device_type = device_type; } @@ -1129,7 +1129,7 @@ index 765cefb32..806de969a 100644 /*! * \brief Generates a wallet or restores one. Assumes the multisig setup * has already completed for the provided multisig info. -@@ -5725,7 +5790,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip +@@ -5802,7 +5867,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip return retval; } @@ -1138,7 +1138,7 @@ index 765cefb32..806de969a 100644 { // -1 month for fluctuations in block time and machine date/time setup. // avg seconds per block -@@ -5749,7 +5814,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip +@@ -5826,7 +5891,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip // the daemon is currently syncing. // If we use the approximate height we subtract one month as // a safety margin. @@ -1147,7 +1147,7 @@ index 765cefb32..806de969a 100644 uint64_t target_height = get_daemon_blockchain_target_height(err); if (err.empty()) { if (target_height < height) -@@ -13646,7 +13711,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err) +@@ -13661,7 +13726,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err) return target_height; } @@ -1156,7 +1156,7 @@ index 765cefb32..806de969a 100644 { // time of v2 fork const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658; -@@ -13655,7 +13720,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const +@@ -13670,7 +13735,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const // avg seconds per block const int seconds_per_block = DIFFICULTY_TARGET_V2; // Calculated blockchain height @@ -1165,7 +1165,7 @@ index 765cefb32..806de969a 100644 // testnet and stagenet got some huge rollbacks, so the estimation is way off static const uint64_t approximate_rolled_back_blocks = m_nettype == TESTNET ? 342100 : m_nettype == STAGENET ? 60000 : 30000; if ((m_nettype == TESTNET || m_nettype == STAGENET) && approx_blockchain_height > approximate_rolled_back_blocks) -@@ -15794,15 +15859,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin +@@ -15796,15 +15861,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin //---------------------------------------------------------------------------------------------------- uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day) { @@ -1181,7 +1181,7 @@ index 765cefb32..806de969a 100644 std::tm date = { 0, 0, 0, 0, 0, 0, 0, 0 }; date.tm_year = year - 1900; date.tm_mon = month - 1; -@@ -15811,7 +15867,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui +@@ -15813,7 +15869,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui { throw std::runtime_error("month or day out of range"); } @@ -1206,7 +1206,7 @@ index 765cefb32..806de969a 100644 uint64_t height_min = 0; uint64_t height_max = get_daemon_blockchain_height(err) - 1; diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index a752f15b9..a619bdd15 100644 +index 18e60d89a..419272a54 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -72,6 +72,7 @@ @@ -1254,7 +1254,7 @@ index a752f15b9..a619bdd15 100644 /*! * \brief Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned. */ -@@ -1562,8 +1586,8 @@ private: +@@ -1570,8 +1594,8 @@ private: /*! * \brief Calculates the approximate blockchain height from current date/time. */ @@ -1265,7 +1265,7 @@ index a752f15b9..a619bdd15 100644 std::vector select_available_outputs_from_histogram(uint64_t count, bool atleast, bool unlocked, bool allow_rct); std::vector select_available_outputs(const std::function &f); std::vector select_available_unmixable_outputs(); -@@ -1657,6 +1681,7 @@ private: +@@ -1665,6 +1689,7 @@ private: bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector &unknown_parameters, std::string &error); uint64_t get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day); // 1<=month<=12, 1<=day<=31 @@ -1273,7 +1273,7 @@ index a752f15b9..a619bdd15 100644 bool is_synced(); -@@ -2003,6 +2028,7 @@ private: +@@ -2011,6 +2036,7 @@ private: std::string seed_language; /*!< Language of the mnemonics (seed). */ bool is_old_file_format; /*!< Whether the wallet file is of an old file format */ bool m_watch_only; /*!< no spend key */ @@ -1282,5 +1282,5 @@ index a752f15b9..a619bdd15 100644 uint32_t m_multisig_threshold; std::vector m_multisig_signers; -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0008-coin-control.patch b/patches/monero/0008-coin-control.patch index d0f2811..0ed4fb2 100644 --- a/patches/monero/0008-coin-control.patch +++ b/patches/monero/0008-coin-control.patch @@ -1,7 +1,7 @@ -From 722abaf1f84d8444d40e277f8b97e54250195856 Mon Sep 17 00:00:00 2001 +From 6811bdac7b98fd29c0566e758fc2d4353b9c3cec Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 11:07:57 +0100 -Subject: [PATCH 08/17] coin control +Subject: [PATCH 08/20] coin control --- src/simplewallet/simplewallet.cpp | 2 +- @@ -22,10 +22,10 @@ Subject: [PATCH 08/17] coin control create mode 100644 src/wallet/api/coins_info.h diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp -index 89691e9f7..b26817e52 100644 +index 39bf169f3..40e25e1d0 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp -@@ -6930,7 +6930,7 @@ bool simple_wallet::transfer_main(const std::vector &args_, bool ca +@@ -6917,7 +6917,7 @@ bool simple_wallet::transfer_main(const std::vector &args_, bool ca { // figure out what tx will be necessary auto ptx_vector = m_wallet->create_transactions_2(dsts, fake_outs_count, priority, extra, @@ -504,7 +504,7 @@ index 000000000..c43e45abd + +#endif //FEATHER_COINS_INFO_H diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 050212ff7..b259528ef 100644 +index 17a98c066..1b86404be 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -35,6 +35,7 @@ @@ -813,7 +813,7 @@ index e7873dd78..bc782dd4a 100644 // multi-threaded refresh stuff diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index 8fa0bbd42..7e67f02fd 100644 +index 80bfdacb2..97dd29bde 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -263,6 +263,51 @@ struct AddressBook @@ -897,10 +897,10 @@ index 8fa0bbd42..7e67f02fd 100644 virtual SubaddressAccount * subaddressAccount() = 0; virtual void setListener(WalletListener *) = 0; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index 806de969a..8720e18b1 100644 +index 972310343..c50a840b6 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp -@@ -2103,12 +2103,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const +@@ -2136,12 +2136,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const return false; } @@ -922,7 +922,7 @@ index 806de969a..8720e18b1 100644 void wallet2::thaw(const crypto::key_image &ki) { thaw(get_transfer_details(ki)); -@@ -2119,6 +2128,18 @@ bool wallet2::frozen(const crypto::key_image &ki) const +@@ -2152,6 +2161,18 @@ bool wallet2::frozen(const crypto::key_image &ki) const return frozen(get_transfer_details(ki)); } //---------------------------------------------------------------------------------------------------- @@ -941,7 +941,7 @@ index 806de969a..8720e18b1 100644 size_t wallet2::get_transfer_details(const crypto::key_image &ki) const { for (size_t idx = 0; idx < m_transfers.size(); ++idx) -@@ -2530,6 +2551,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote +@@ -2563,6 +2584,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote uint64_t amount = tx.vout[o].amount ? tx.vout[o].amount : tx_scan_info[o].amount; if (!pool) { @@ -949,7 +949,7 @@ index 806de969a..8720e18b1 100644 m_transfers.push_back(transfer_details{}); transfer_details& td = m_transfers.back(); td.m_block_height = height; -@@ -2633,6 +2655,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote +@@ -2666,6 +2688,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote uint64_t extra_amount = amount - burnt; if (!pool) { @@ -957,7 +957,7 @@ index 806de969a..8720e18b1 100644 transfer_details &td = m_transfers[kit->second]; td.m_block_height = height; td.m_internal_output_index = o; -@@ -10511,7 +10534,7 @@ void wallet2::transfer_selected_rct(std::vector picks; float current_output_relatdness = 1.0f; -@@ -10522,6 +10545,9 @@ std::vector wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui +@@ -10537,6 +10560,9 @@ std::vector wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui for (size_t i = 0; i < m_transfers.size(); ++i) { const transfer_details& td = m_transfers[i]; @@ -976,7 +976,7 @@ index 806de969a..8720e18b1 100644 if (!is_spent(td, false) && !td.m_frozen && td.is_rct() && td.amount() >= needed_money && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1) { if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below) -@@ -10542,6 +10568,9 @@ std::vector wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui +@@ -10557,6 +10583,9 @@ std::vector wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui for (size_t i = 0; i < m_transfers.size(); ++i) { const transfer_details& td = m_transfers[i]; @@ -986,7 +986,7 @@ index 806de969a..8720e18b1 100644 if (!is_spent(td, false) && !td.m_frozen && !td.m_key_image_partial && td.is_rct() && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1) { if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below) -@@ -10553,6 +10582,9 @@ std::vector wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui +@@ -10568,6 +10597,9 @@ std::vector wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui for (size_t j = i + 1; j < m_transfers.size(); ++j) { const transfer_details& td2 = m_transfers[j]; @@ -996,7 +996,7 @@ index 806de969a..8720e18b1 100644 if (td2.amount() > m_ignore_outputs_above || td2.amount() < m_ignore_outputs_below) { MDEBUG("Ignoring output " << j << " of amount " << print_money(td2.amount()) << " which is outside prescribed range [" << print_money(m_ignore_outputs_below) << ", " << print_money(m_ignore_outputs_above) << "]"); -@@ -11125,7 +11157,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image, +@@ -11140,7 +11172,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image, // This system allows for sending (almost) the entire balance, since it does // not generate spurious change in all txes, thus decreasing the instantaneous // usable balance. @@ -1005,7 +1005,7 @@ index 806de969a..8720e18b1 100644 { //ensure device is let in NONE mode in any case hw::device &hwdev = m_account.get_device(); -@@ -11333,6 +11365,9 @@ std::vector wallet2::create_transactions_2(std::vector wallet2::create_transactions_2(std::vector wallet2::create_transactions_2(std::vector wallet2::create_transactions_2(std::vector &ptx_vector, c +@@ -11918,7 +11953,7 @@ bool wallet2::sanity_check(const std::vector &ptx_vector, c return true; } @@ -1033,7 +1033,7 @@ index 806de969a..8720e18b1 100644 { std::vector unused_transfers_indices; std::vector unused_dust_indices; -@@ -11932,6 +11967,9 @@ std::vector wallet2::create_transactions_all(uint64_t below +@@ -11947,6 +11982,9 @@ std::vector wallet2::create_transactions_all(uint64_t below for (size_t i = 0; i < m_transfers.size(); ++i) { const transfer_details& td = m_transfers[i]; @@ -1044,10 +1044,10 @@ index 806de969a..8720e18b1 100644 { MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below threshold " << print_money(fractional_threshold)); diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index a619bdd15..4f324c238 100644 +index 419272a54..d07dc7e8b 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h -@@ -1216,8 +1216,8 @@ private: +@@ -1223,8 +1223,8 @@ private: bool parse_unsigned_tx_from_str(const std::string &unsigned_tx_st, unsigned_tx_set &exported_txs) const; bool load_tx(const std::string &signed_filename, std::vector &ptx, std::function accept_func = NULL); bool parse_tx_from_str(const std::string &signed_tx_st, std::vector &ptx, std::function accept_func); @@ -1058,7 +1058,7 @@ index a619bdd15..4f324c238 100644 std::vector create_transactions_single(const crypto::key_image &ki, const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, const size_t fake_outs_count, uint32_t priority, const std::vector& extra); std::vector create_transactions_from(const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, std::vector unused_transfers_indices, std::vector unused_dust_indices, const size_t fake_outs_count, uint32_t priority, const std::vector& extra); bool sanity_check(const std::vector &ptx_vector, const std::vector& dsts, const unique_index_container& subtract_fee_from_outputs = {}) const; -@@ -1569,6 +1569,7 @@ private: +@@ -1576,6 +1576,7 @@ private: uint64_t get_num_rct_outputs(); size_t get_num_transfer_details() const { return m_transfers.size(); } const transfer_details &get_transfer_details(size_t idx) const; @@ -1066,7 +1066,7 @@ index a619bdd15..4f324c238 100644 uint8_t get_current_hard_fork(); void get_hard_fork_info(uint8_t version, uint64_t &earliest_height); -@@ -1800,7 +1801,9 @@ private: +@@ -1808,7 +1809,9 @@ private: void freeze(size_t idx); void thaw(size_t idx); bool frozen(size_t idx) const; @@ -1076,7 +1076,7 @@ index a619bdd15..4f324c238 100644 void thaw(const crypto::key_image &ki); bool frozen(const crypto::key_image &ki) const; bool frozen(const transfer_details &td) const; -@@ -1841,6 +1844,8 @@ private: +@@ -1849,6 +1852,8 @@ private: static std::string get_default_daemon_address() { CRITICAL_REGION_LOCAL(default_daemon_address_lock); return default_daemon_address; } @@ -1085,7 +1085,7 @@ index a619bdd15..4f324c238 100644 private: /*! * \brief Stores wallet information to wallet file. -@@ -1912,7 +1917,7 @@ private: +@@ -1920,7 +1925,7 @@ private: std::vector get_unspent_amounts_vector(bool strict); uint64_t get_dynamic_base_fee_estimate(); float get_output_relatedness(const transfer_details &td0, const transfer_details &td1) const; @@ -1095,5 +1095,5 @@ index a619bdd15..4f324c238 100644 void set_unspent(size_t idx); bool is_spent(const transfer_details &td, bool strict = true) const; -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch index 9741055..df3b9ad 100644 --- a/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch +++ b/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch @@ -1,7 +1,7 @@ -From f386189cf3c5b433251b2cf493ba264a1a79fb7e Mon Sep 17 00:00:00 2001 +From 300a5110cccb1e3caf763b1f9bf5dc0ecc0973c8 Mon Sep 17 00:00:00 2001 From: M Date: Fri, 21 Apr 2023 15:43:47 -0400 -Subject: [PATCH 09/17] Add hex encoding and tx key getter for +Subject: [PATCH 09/20] Add hex encoding and tx key getter for PendingTransction in wallet api. --- @@ -51,7 +51,7 @@ index 403bfe281..0cc6c58e9 100644 private: friend class WalletImpl; diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index 7e67f02fd..7f1462a44 100644 +index 97dd29bde..b5cccac40 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -127,6 +127,8 @@ struct PendingTransaction @@ -64,5 +64,5 @@ index 7e67f02fd..7f1462a44 100644 /** -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch index 8d939f8..e8f7538 100644 --- a/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch +++ b/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch @@ -1,7 +1,7 @@ -From 55f5311122fb9d19e870fa4a330c59d76ca92aac Mon Sep 17 00:00:00 2001 +From 3e15968c13d2a7c0098d26e72168a5774d6cdd89 Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Wed, 11 Oct 2023 16:47:59 +0200 -Subject: [PATCH 10/17] Add recoverDeterministicWalletFromSpendKey +Subject: [PATCH 10/20] Add recoverDeterministicWalletFromSpendKey This function is used by Cake Wallet to enable polyseed (dart implementation) support. @@ -19,7 +19,7 @@ Co-authored-by: Godwin Asuquo 5 files changed, 75 insertions(+) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index b259528ef..20ccbfb35 100644 +index 1b86404be..00918e357 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -824,6 +824,35 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c @@ -74,7 +74,7 @@ index bc782dd4a..bfe81c590 100644 const std::string &password, const std::string &device_name); diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index 7f1462a44..27e8b1426 100644 +index b5cccac40..fcb8187d4 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -1324,6 +1324,25 @@ struct WalletManager @@ -149,5 +149,5 @@ index 28fcd36c9..be3ff8184 100644 const std::string &password, NetworkType nettype, -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0011-add-monero-submodule-support.patch b/patches/monero/0011-add-monero-submodule-support.patch index 413aaba..fee1fba 100644 --- a/patches/monero/0011-add-monero-submodule-support.patch +++ b/patches/monero/0011-add-monero-submodule-support.patch @@ -1,20 +1,28 @@ -From ec93b6bf725eeff0999fdd9d603c4578cb19ae07 Mon Sep 17 00:00:00 2001 +From e06b0e86b6b6204bf20c0caadde64da1f0966da1 Mon Sep 17 00:00:00 2001 From: cyan Date: Thu, 7 Nov 2024 16:46:24 +0000 -Subject: [PATCH 11/17] add monero submodule support +Subject: [PATCH 11/20] add monero submodule support --- - CMakeLists.txt | 6 +++--- - cmake/CheckLinkerFlag.cmake | 2 +- - src/wallet/wallet_rpc_server.cpp | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) + CMakeLists.txt | 12 ++++++------ + src/wallet/wallet_rpc_server.cpp | 2 +- + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index f0630ef9b..9406e57b4 100644 +index 390339523..d0af390d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -75,7 +75,7 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "nin + set(CMAKE_JOB_POOL_LINK link_job_pool) + endif () + endif () +- ++ + option (USE_CLANG_TIDY_C "Lint the code with clang-tidy - variant C" OFF) + option (USE_CLANG_TIDY_CXX "Lint the code with clang-tidy - variant C++" OFF) + if (USE_CLANG_TIDY_C AND USE_CLANG_TIDY_CXX) @@ -223,9 +223,9 @@ function(forbid_undefined_symbols) - cmake_minimum_required(VERSION 3.1) + cmake_minimum_required(VERSION 3.5) project(test) option(EXPECT_SUCCESS "" ON) -file(WRITE "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }") @@ -25,6 +33,15 @@ index f0630ef9b..9406e57b4 100644 endif() add_library(l0 SHARED incorrect_source.cpp) add_library(l1 MODULE incorrect_source.cpp) +@@ -363,7 +363,7 @@ if(NOT MANUAL_SUBMODULES) + message(FATAL_ERROR "Submodule '${relative_path}' is not up-to-date. Please update all submodules with\ngit submodule update --init --force\nor run cmake with -DMANUAL_SUBMODULES=1\n") + endif() + endfunction () +- ++ + message(STATUS "Checking submodules") + # check_submodule(external/bc-ur) + check_submodule(external/miniupnp) @@ -390,7 +390,7 @@ else() endif() @@ -34,24 +51,20 @@ index f0630ef9b..9406e57b4 100644 if (NOT DEFINED ENV{DEVELOPER_LOCAL_TOOLS}) message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env (not required)") -diff --git a/cmake/CheckLinkerFlag.cmake b/cmake/CheckLinkerFlag.cmake -index 7ecf5f610..89fb9d167 100644 ---- a/cmake/CheckLinkerFlag.cmake -+++ b/cmake/CheckLinkerFlag.cmake -@@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE) - message(STATUS "Looking for ${flag} linker flag") - endif() +@@ -1003,7 +1003,7 @@ else() -- set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c) -+ set(_cle_source ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckLinkerFlag.c) - - set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) - set(CMAKE_C_FLAGS "${flag}") + # random crash on startup when asan is on if pie is enabled + if(NOT SANITIZE AND ANDROID AND NOT BUILD_GUI_DEPS STREQUAL "ON" OR IOS) +- #From Android 5: "only position independent executables (PIE) are supported" ++ #From Android 5: "only position independent executables (PIE) are supported" + message(STATUS "Enabling PIE executable") + set(PIC_FLAG "") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE") diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp -index 3188c88db..9fbdb3c05 100644 +index 0cf75a1c4..66def08ef 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp -@@ -1184,7 +1184,7 @@ namespace tools +@@ -1261,7 +1261,7 @@ namespace tools { uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0); uint32_t priority = m_wallet->adjust_priority(req.priority); @@ -61,5 +74,5 @@ index 3188c88db..9fbdb3c05 100644 if (ptx_vector.empty()) { -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0012-fix-iOS-depends-build.patch b/patches/monero/0012-fix-iOS-depends-build.patch index 5d75424..2e4845e 100644 --- a/patches/monero/0012-fix-iOS-depends-build.patch +++ b/patches/monero/0012-fix-iOS-depends-build.patch @@ -1,7 +1,7 @@ -From 73d6ad9d513f776afb1c1f5f2d74e3b06fad7eeb Mon Sep 17 00:00:00 2001 +From 92ca945665cab44adace3331685ae4270a14c07e Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 21 Nov 2024 06:05:03 -0500 -Subject: [PATCH 12/17] fix iOS depends build +Subject: [PATCH 12/20] fix iOS depends build --- CMakeLists.txt | 4 ---- @@ -11,7 +11,7 @@ Subject: [PATCH 12/17] fix iOS depends build 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9406e57b4..1eac121db 100644 +index d0af390d0..b814c76b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,6 @@ include(CheckLibraryExists) @@ -100,5 +100,5 @@ index 71b8f78cc..0f53f024e 100644 #if TARGET_OS_MAC && (!defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7) return boost::logic::tribool(IOPSGetTimeRemainingEstimate() != kIOPSTimeRemainingUnlimited); -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch b/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch index 453d651..56c8132 100644 --- a/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch +++ b/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch @@ -1,7 +1,7 @@ -From db52bcebe23b29b35ae538f01e72ed4f7f66f931 Mon Sep 17 00:00:00 2001 +From 60ef2d2a25b07aca8f25ef5016eb4b9b7c253a50 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 18 Nov 2024 10:57:37 -0500 -Subject: [PATCH 13/17] include locale only when targeting WIN32 +Subject: [PATCH 13/20] include locale only when targeting WIN32 --- CMakeLists.txt | 6 +++++- @@ -9,10 +9,10 @@ Subject: [PATCH 13/17] include locale only when targeting WIN32 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1eac121db..5938be622 100644 +index b814c76b7..cef44dd1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1089,7 +1089,11 @@ if(NOT Boost_FOUND) +@@ -1090,7 +1090,11 @@ if(NOT Boost_FOUND) elseif(Boost_FOUND) message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}") @@ -26,7 +26,7 @@ index 1eac121db..5938be622 100644 # Boost System is header-only since 1.69 if (Boost_VERSION_STRING VERSION_LESS 1.69.0) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 20ccbfb35..c43803033 100644 +index 00918e357..107f516f3 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -46,7 +46,9 @@ @@ -40,5 +40,5 @@ index 20ccbfb35..c43803033 100644 #include "bc-ur/src/bc-ur.hpp" #if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI) -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0014-change-earliest-fork-height-message.patch b/patches/monero/0014-change-earliest-fork-height-message.patch index c097694..3a4321b 100644 --- a/patches/monero/0014-change-earliest-fork-height-message.patch +++ b/patches/monero/0014-change-earliest-fork-height-message.patch @@ -1,17 +1,17 @@ -From be01eac2724d22cd7225bb17fba7a443efe8d8d6 Mon Sep 17 00:00:00 2001 +From 7c58eb392e94ff5b50bcb15b8d91038476743ba9 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 29 Jan 2025 16:13:28 +0100 -Subject: [PATCH 14/17] change earliest fork height message +Subject: [PATCH 14/20] change earliest fork height message --- src/wallet/wallet2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index 8720e18b1..69da11d9c 100644 +index c50a840b6..a7532d7ec 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp -@@ -12365,7 +12365,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks) +@@ -12380,7 +12380,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks) boost::optional result = m_node_rpc_proxy.get_height(height); THROW_WALLET_EXCEPTION_IF(result, error::wallet_internal_error, "Failed to get height"); result = m_node_rpc_proxy.get_earliest_height(version, earliest_height); @@ -21,5 +21,5 @@ index 8720e18b1..69da11d9c 100644 bool close_enough = (int64_t)height >= (int64_t)earliest_height - early_blocks && earliest_height != std::numeric_limits::max(); // start using the rules that many blocks beforehand if (close_enough) -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0015-remove-trivially_copyable-assert.patch b/patches/monero/0015-remove-trivially_copyable-assert.patch index 4f22f32..8113bdd 100644 --- a/patches/monero/0015-remove-trivially_copyable-assert.patch +++ b/patches/monero/0015-remove-trivially_copyable-assert.patch @@ -1,7 +1,7 @@ -From b62446750e904978cd1a8f90d5f2d1437a3db5a9 Mon Sep 17 00:00:00 2001 +From dc67abfbc3dec2f4aa4c4157378509c9ee07cb0b Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 20 Feb 2025 08:36:28 +0100 -Subject: [PATCH 15/17] remove trivially_copyable assert +Subject: [PATCH 15/20] remove trivially_copyable assert --- contrib/epee/include/span.h | 1 - @@ -20,5 +20,5 @@ index 01dc387d6..2ad733a2f 100644 return {reinterpret_cast(std::addressof(src)), sizeof(T)}; } -- -2.49.0 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0016-pr-9880.patch b/patches/monero/0016-pr-9880.patch deleted file mode 100644 index 22d1825..0000000 --- a/patches/monero/0016-pr-9880.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ab4e853571329b3ccb745c393220c047b03f2b2c Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Tue, 1 Apr 2025 11:30:45 +0200 -Subject: [PATCH 16/17] pr-9880 - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5938be622..1c4728578 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -216,7 +216,7 @@ function(forbid_undefined_symbols) - file(MAKE_DIRECTORY "${TEST_PROJECT}") - file(WRITE "${TEST_PROJECT}/CMakeLists.txt" - [=[ --cmake_minimum_required(VERSION 3.1) -+cmake_minimum_required(VERSION 3.5) - project(test) - option(EXPECT_SUCCESS "" ON) - file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }") --- -2.49.0 - diff --git a/patches/monero/0017-fix-unary_function-__unary_function.patch b/patches/monero/0017-fix-unary_function-__unary_function.patch deleted file mode 100644 index b964dbe..0000000 --- a/patches/monero/0017-fix-unary_function-__unary_function.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 32f2e6cc2e184bfdaa92a5d45a15983c896f6816 Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Thu, 10 Apr 2025 13:28:05 +0200 -Subject: [PATCH 17/17] fix: unary_function -> __unary_function - ---- - src/cryptonote_basic/cryptonote_basic_impl.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/cryptonote_basic/cryptonote_basic_impl.h b/src/cryptonote_basic/cryptonote_basic_impl.h -index b423573c5..a9aef7a2a 100644 ---- a/src/cryptonote_basic/cryptonote_basic_impl.h -+++ b/src/cryptonote_basic/cryptonote_basic_impl.h -@@ -40,7 +40,11 @@ namespace cryptonote { - /* */ - /************************************************************************/ - template -+#ifdef __APPLE__ -+ struct array_hasher: std::__unary_function -+#else - struct array_hasher: std::unary_function -+#endif - { - std::size_t operator()(const t_array& val) const - { --- -2.49.0 - diff --git a/patches/monero/0018-serialize-cache-to-JSON.patch b/patches/monero/0018-serialize-cache-to-JSON.patch deleted file mode 100644 index dbec2f2..0000000 --- a/patches/monero/0018-serialize-cache-to-JSON.patch +++ /dev/null @@ -1,463 +0,0 @@ -From 7c1d576901a56b7c315b2c54362f7985ff8df753 Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Tue, 12 Aug 2025 07:09:14 -0400 -Subject: [PATCH] serialize cache to JSON - ---- - src/wallet/CMakeLists.txt | 1 + - src/wallet/api/wallet.cpp | 5 + - src/wallet/api/wallet.h | 2 + - src/wallet/api/wallet2_api.h | 3 + - src/wallet/wallet2.h | 6 + - src/wallet/wallet_cache_to_json.cpp | 368 ++++++++++++++++++++++++++++ - 6 files changed, 385 insertions(+) - create mode 100644 src/wallet/wallet_cache_to_json.cpp - -diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt -index b163212b7..196ad671f 100644 ---- a/src/wallet/CMakeLists.txt -+++ b/src/wallet/CMakeLists.txt -@@ -38,6 +38,7 @@ set(wallet_sources - message_store.cpp - message_transporter.cpp - wallet_rpc_payments.cpp -+ wallet_cache_to_json.cpp - ) - - monero_find_all_headers(wallet_private_headers "${CMAKE_CURRENT_SOURCE_DIR}") -diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 7d7d0f922..effb6e719 100644 ---- a/src/wallet/api/wallet.cpp -+++ b/src/wallet/api/wallet.cpp -@@ -3475,4 +3475,9 @@ void Wallet::setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command - #endif - } - -+std::string WalletImpl::serializeCacheToJson() const -+{ -+ return std::string(m_wallet->serialize_cache_to_json()); -+} -+ - } // namespace -diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h -index bfe81c590..98c03b9c1 100644 ---- a/src/wallet/api/wallet.h -+++ b/src/wallet/api/wallet.h -@@ -335,6 +335,8 @@ private: - bool getWaitsForDeviceSend(); - - bool getWaitsForDeviceReceive(); -+ -+ virtual std::string serializeCacheToJson() const override; - }; - - -diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index fcb8187d4..3d11929f9 100644 ---- a/src/wallet/api/wallet2_api.h -+++ b/src/wallet/api/wallet2_api.h -@@ -1217,6 +1217,9 @@ struct Wallet - static void setDeviceReceivedData(unsigned char* data, size_t len); - static void setDeviceSendData(unsigned char* data, size_t len); - static void setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command, unsigned int cmd_len)); -+ -+ //! serialize wallet cache to JSON -+ virtual std::string serializeCacheToJson() const = 0; - }; - - /** -diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index 4f324c238..bc4abc672 100644 ---- a/src/wallet/wallet2.h -+++ b/src/wallet/wallet2.h -@@ -1429,6 +1429,12 @@ private: - FIELD(m_background_sync_data) - END_SERIALIZE() - -+ /*! -+ * \brief Serialize wallet cache fields to JSON -+ * \return const char* pointing to JSON string containing all cache fields -+ */ -+ const char* serialize_cache_to_json() const; -+ - /*! - * \brief Check if wallet keys and bin files exist - * \param file_path Wallet file path -diff --git a/src/wallet/wallet_cache_to_json.cpp b/src/wallet/wallet_cache_to_json.cpp -new file mode 100644 -index 000000000..64687a7a6 ---- /dev/null -+++ b/src/wallet/wallet_cache_to_json.cpp -@@ -0,0 +1,368 @@ -+#include "wallet2.h" -+#include "serialization/binary_archive.h" -+#include "serialization/json_archive.h" -+#include "serialization/serialization.h" -+#include -+#include -+ -+namespace tools -+{ -+ -+static void write_escaped_json_string(std::ostream& os, const std::string& str) -+{ -+ for (char c : str) { -+ switch (c) { -+ case '"': os << "\\\""; break; -+ case '\\': os << "\\\\"; break; -+ case '\n': os << "\\n"; break; -+ case '\r': os << "\\r"; break; -+ case '\t': os << "\\t"; break; -+ case '\b': os << "\\b"; break; -+ case '\f': os << "\\f"; break; -+ default: os << c; break; -+ } -+ } -+} -+ -+static void post_process_json(std::string& json) -+{ -+ // ": ," --> ": null," -+ size_t pos = 0; -+ while ((pos = json.find(": ,", pos)) != std::string::npos) { -+ json.replace(pos, 3, ": null,"); -+ pos += 7; -+ } -+ -+ // ": }" --> ": null}" -+ pos = 0; -+ while ((pos = json.find(": }", pos)) != std::string::npos) { -+ json.replace(pos, 3, ": null}"); -+ pos += 7; -+ } -+ -+ // ": ]" --> ": null]" -+ pos = 0; -+ while ((pos = json.find(": ]", pos)) != std::string::npos) { -+ json.replace(pos, 3, ": null]"); -+ pos += 7; -+ } -+ -+ // "key": number"hexstring" --> "key": "numberhexstring" -+ pos = 0; -+ while (pos < json.length()) { -+ size_t colon_pos = json.find(": ", pos); -+ if (colon_pos == std::string::npos) break; -+ -+ size_t value_start = colon_pos + 2; -+ if (value_start >= json.length()) break; -+ -+ if (std::isdigit(json[value_start])) { -+ size_t quote_pos = json.find('"', value_start); -+ if (quote_pos != std::string::npos && quote_pos < json.find_first_of(",}]", value_start)) { -+ size_t closing_quote = json.find('"', quote_pos + 1); -+ if (closing_quote != std::string::npos && closing_quote < json.find_first_of(",}]", value_start)) { -+ std::string digits; -+ size_t digit_end = value_start; -+ while (digit_end < quote_pos && std::isdigit(json[digit_end])) { -+ digits += json[digit_end]; -+ digit_end++; -+ } -+ -+ if (digit_end == quote_pos && !digits.empty()) { -+ std::string hex_part = json.substr(quote_pos + 1, closing_quote - quote_pos - 1); -+ -+ std::string replacement = "\"" + digits + hex_part + "\""; -+ json.replace(value_start, closing_quote - value_start + 1, replacement); -+ pos = value_start + replacement.length(); -+ continue; -+ } -+ } -+ } -+ } -+ -+ pos = colon_pos + 1; -+ } -+} -+ -+const char* wallet2::serialize_cache_to_json() const -+{ -+ static std::string json_result; -+ -+ try -+ { -+ std::stringstream oss; -+ json_archive ar(oss, true); // true for pretty printing -+ -+ ar.begin_object(); -+ -+ // MAGIC_FIELD("monero wallet cache") -+ std::string magic = "monero wallet cache"; -+ ar.tag("magic"); -+ ar.serialize_blob((void*)magic.data(), magic.size()); -+ if (!ar.good()) { -+ json_result = "{\"error\":\"Failed to serialize magic field\"}"; -+ return json_result.c_str(); -+ } -+ -+ // VERSION_FIELD(2) -+ uint32_t version = 2; -+ ar.tag("version"); -+ ar.serialize_varint(version); -+ if (!ar.good()) { -+ json_result = "{\"error\":\"Failed to serialize version field\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_blockchain) - hashchain type, has serialization support -+ ar.tag("m_blockchain"); -+ if (!::serialization::serialize(ar, const_cast(m_blockchain))) { -+ json_result = "{\"error\":\"Failed to serialize m_blockchain\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_transfers) - transfer_container (std::vector) -+ ar.tag("m_transfers"); -+ if (!::serialization::serialize(ar, const_cast(m_transfers))) { -+ json_result = "{\"error\":\"Failed to serialize m_transfers\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_account_public_address) - cryptonote::account_public_address -+ ar.tag("m_account_public_address"); -+ if (!::serialization::serialize(ar, const_cast(m_account_public_address))) { -+ json_result = "{\"error\":\"Failed to serialize m_account_public_address\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_key_images) - serializable_unordered_map -+ ar.tag("m_key_images"); -+ if (!::serialization::serialize(ar, const_cast&>(m_key_images))) { -+ json_result = "{\"error\":\"Failed to serialize m_key_images\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_unconfirmed_txs) - serializable_unordered_map -+ ar.tag("m_unconfirmed_txs"); -+ if (!::serialization::serialize(ar, const_cast&>(m_unconfirmed_txs))) { -+ json_result = "{\"error\":\"Failed to serialize m_unconfirmed_txs\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_payments) - payment_container (serializable_unordered_multimap) -+ ar.tag("m_payments"); -+ if (!::serialization::serialize(ar, const_cast(m_payments))) { -+ json_result = "{\"error\":\"Failed to serialize m_payments\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_tx_keys) - serializable_unordered_map -+ ar.tag("m_tx_keys"); -+ if (!::serialization::serialize(ar, const_cast&>(m_tx_keys))) { -+ json_result = "{\"error\":\"Failed to serialize m_tx_keys\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_confirmed_txs) - serializable_unordered_map -+ ar.tag("m_confirmed_txs"); -+ if (!::serialization::serialize(ar, const_cast&>(m_confirmed_txs))) { -+ json_result = "{\"error\":\"Failed to serialize m_confirmed_txs\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_tx_notes) - serializable_unordered_map -+ ar.tag("m_tx_notes"); -+ if (!::serialization::serialize(ar, const_cast&>(m_tx_notes))) { -+ json_result = "{\"error\":\"Failed to serialize m_tx_notes\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_unconfirmed_payments) - serializable_unordered_multimap -+ ar.tag("m_unconfirmed_payments"); -+ if (!::serialization::serialize(ar, const_cast&>(m_unconfirmed_payments))) { -+ json_result = "{\"error\":\"Failed to serialize m_unconfirmed_payments\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_pub_keys) - serializable_unordered_map -+ ar.tag("m_pub_keys"); -+ if (!::serialization::serialize(ar, const_cast&>(m_pub_keys))) { -+ json_result = "{\"error\":\"Failed to serialize m_pub_keys\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_address_book) - std::vector -+ ar.tag("m_address_book"); -+ if (!::serialization::serialize(ar, const_cast&>(m_address_book))) { -+ json_result = "{\"error\":\"Failed to serialize m_address_book\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_scanned_pool_txs[0]) - std::unordered_set -+ ar.tag("m_scanned_pool_txs_0"); -+ if (!::serialization::serialize(ar, const_cast&>(m_scanned_pool_txs[0]))) { -+ json_result = "{\"error\":\"Failed to serialize m_scanned_pool_txs[0]\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_scanned_pool_txs[1]) - std::unordered_set -+ ar.tag("m_scanned_pool_txs_1"); -+ if (!::serialization::serialize(ar, const_cast&>(m_scanned_pool_txs[1]))) { -+ json_result = "{\"error\":\"Failed to serialize m_scanned_pool_txs[1]\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_subaddresses) - serializable_unordered_map -+ ar.tag("m_subaddresses"); -+ if (!::serialization::serialize(ar, const_cast&>(m_subaddresses))) { -+ json_result = "{\"error\":\"Failed to serialize m_subaddresses\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_subaddress_labels) - std::vector> - manual JSON serialization -+ oss << ", \n \"m_subaddress_labels\": ["; -+ for (size_t i = 0; i < m_subaddress_labels.size(); ++i) { -+ if (i > 0) oss << ", "; -+ oss << "\n ["; -+ for (size_t j = 0; j < m_subaddress_labels[i].size(); ++j) { -+ if (j > 0) oss << ", "; -+ oss << "\""; -+ write_escaped_json_string(oss, m_subaddress_labels[i][j]); -+ oss << "\""; -+ } -+ oss << "]"; -+ } -+ oss << "\n ]"; -+ -+ // FIELD(m_additional_tx_keys) - serializable_unordered_map> -+ ar.tag("m_additional_tx_keys"); -+ if (!::serialization::serialize(ar, const_cast>&>(m_additional_tx_keys))) { -+ json_result = "{\"error\":\"Failed to serialize m_additional_tx_keys\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_attributes) - serializable_unordered_map - manual JSON serialization -+ oss << ", \n \"m_attributes\": {"; -+ bool first_attr = true; -+ for (const auto& attr : m_attributes) { -+ if (!first_attr) oss << ", "; -+ first_attr = false; -+ oss << "\n \""; -+ write_escaped_json_string(oss, attr.first); -+ oss << "\": \""; -+ write_escaped_json_string(oss, attr.second); -+ oss << "\""; -+ } -+ oss << "\n }"; -+ -+ // FIELD(m_account_tags) - std::pair, std::vector> - manual JSON serialization -+ oss << ", \n \"m_account_tags\": {"; -+ oss << "\n \"tags_map\": {"; -+ bool first_tag = true; -+ for (const auto& tag : m_account_tags.first) { -+ if (!first_tag) oss << ", "; -+ first_tag = false; -+ oss << "\n \""; -+ write_escaped_json_string(oss, tag.first); -+ oss << "\": \""; -+ write_escaped_json_string(oss, tag.second); -+ oss << "\""; -+ } -+ oss << "\n },"; -+ oss << "\n \"account_list\": ["; -+ for (size_t i = 0; i < m_account_tags.second.size(); ++i) { -+ if (i > 0) oss << ", "; -+ oss << "\n \""; -+ write_escaped_json_string(oss, m_account_tags.second[i]); -+ oss << "\""; -+ } -+ oss << "\n ]"; -+ oss << "\n }"; -+ -+ // FIELD(m_ring_history_saved) - bool -+ // ar.tag("m_ring_history_saved"); -+ // ar.serialize_blob(&m_ring_history_saved, sizeof(m_ring_history_saved)); -+ // if (!ar.good()) { -+ // json_result = "{\"error\":\"Failed to serialize m_ring_history_saved\"}"; -+ // return json_result.c_str(); -+ // } -+ -+ // FIELD(m_last_block_reward) - uint64_t -+ ar.tag("m_last_block_reward"); -+ ar.serialize_int(m_last_block_reward); -+ if (!ar.good()) { -+ json_result = "{\"error\":\"Failed to serialize m_last_block_reward\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_tx_device) - serializable_unordered_map -+ ar.tag("m_tx_device"); -+ if (!::serialization::serialize(ar, const_cast&>(m_tx_device))) { -+ json_result = "{\"error\":\"Failed to serialize m_tx_device\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_device_last_key_image_sync) - uint64_t -+ ar.tag("m_device_last_key_image_sync"); -+ ar.serialize_int(m_device_last_key_image_sync); -+ if (!ar.good()) { -+ json_result = "{\"error\":\"Failed to serialize m_device_last_key_image_sync\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_cold_key_images) - serializable_unordered_map -+ ar.tag("m_cold_key_images"); -+ if (!::serialization::serialize(ar, const_cast&>(m_cold_key_images))) { -+ json_result = "{\"error\":\"Failed to serialize m_cold_key_images\"}"; -+ return json_result.c_str(); -+ } -+ -+ // FIELD(m_rpc_client_secret_key) - crypto::secret_key -+ // ar.tag("m_rpc_client_secret_key"); -+ // ar.serialize_blob(&m_rpc_client_secret_key, sizeof(m_rpc_client_secret_key)); -+ // if (!ar.good()) { -+ // json_result = "{\"error\":\"Failed to serialize m_rpc_client_secret_key\"}"; -+ // return json_result.c_str(); -+ // } -+ -+ // Version-dependent fields -+ if (version >= 1) { -+ // FIELD(m_has_ever_refreshed_from_node) - bool -+ // ar.tag("m_has_ever_refreshed_from_node"); -+ // ar.serialize_blob(&m_has_ever_refreshed_from_node, sizeof(m_has_ever_refreshed_from_node)); -+ // if (!ar.good()) { -+ // json_result = "{\"error\":\"Failed to serialize m_has_ever_refreshed_from_node\"}"; -+ // return json_result.c_str(); -+ // } -+ } -+ -+ if (version >= 2) { -+ // FIELD(m_background_sync_data) - background_sync_data_t -+ ar.tag("m_background_sync_data"); -+ if (!::serialization::serialize(ar, const_cast(m_background_sync_data))) { -+ json_result = "{\"error\":\"Failed to serialize m_background_sync_data\"}"; -+ return json_result.c_str(); -+ } -+ } -+ -+ ar.end_object(); -+ -+ if (!ar.good()) { -+ json_result = "{\"error\":\"Failed to finalize JSON serialization\"}"; -+ return json_result.c_str(); -+ } -+ -+ json_result = oss.str(); -+ -+ // Post-process to fix malformed JSON -+ post_process_json(json_result); -+ -+ return json_result.c_str(); -+ } -+ catch (const std::exception& e) -+ { -+ json_result = "{\"error\":\"Failed to serialize wallet cache: " + std::string(e.what()) + "\"}"; -+ return json_result.c_str(); -+ } -+} -+ -+} // namespace tools -\ No newline at end of file --- -2.50.1 - diff --git a/patches/monero/0019-drop-generate_translations_header.c-requirement.patch b/patches/monero/0019-drop-generate_translations_header.c-requirement.patch deleted file mode 100644 index 0c4eba0..0000000 --- a/patches/monero/0019-drop-generate_translations_header.c-requirement.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 31362e91fd086102e8a0f4bc90cfe707d60a8bc6 Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Fri, 20 Feb 2026 08:03:01 +0100 -Subject: [PATCH] drop generate_translations_header.c requirement - ---- - CMakeLists.txt | 15 +++---- - translations/CMakeLists.txt | 79 +++++++++++++------------------------ - 2 files changed, 33 insertions(+), 61 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f6e11ef56..eabe4bec7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -71,7 +71,7 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "nin - set(CMAKE_JOB_POOL_LINK link_job_pool) - endif () - endif () -- -+ - option (USE_CLANG_TIDY_C "Lint the code with clang-tidy - variant C" OFF) - option (USE_CLANG_TIDY_CXX "Lint the code with clang-tidy - variant C++" OFF) - if (USE_CLANG_TIDY_C AND USE_CLANG_TIDY_CXX) -@@ -359,7 +359,7 @@ if(NOT MANUAL_SUBMODULES) - message(FATAL_ERROR "Submodule '${relative_path}' is not up-to-date. Please update all submodules with\ngit submodule update --init --force\nor run cmake with -DMANUAL_SUBMODULES=1\n") - endif() - endfunction () -- -+ - message(STATUS "Checking submodules") - # check_submodule(external/bc-ur) - check_submodule(external/miniupnp) -@@ -666,16 +666,11 @@ endfunction () - # Generate header for embedded translations - # Generate header for embedded translations, use target toolchain if depends, otherwise use the - # lrelease and lupdate binaries from the host --include(ExternalProject) --ExternalProject_Add(generate_translations_header -- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations" -- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations" -- STAMP_DIR ${LRELEASE_PATH} -- CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH} -- INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "") -+add_subdirectory(translations) - include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") - add_subdirectory(external) - -+ - # Final setup for libunbound - include_directories(${UNBOUND_INCLUDE_DIR}) - -diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt -index 3b43360f8..d88a78ced 100644 ---- a/translations/CMakeLists.txt -+++ b/translations/CMakeLists.txt -@@ -30,54 +30,31 @@ cmake_minimum_required(VERSION 3.5) - - project(translations) - --# when crosscompiling import the executable targets from a file --IF(CMAKE_CROSSCOMPILING) -- message(WARNING "CrossCompiling") -- SET(IMPORT_EXECUTABLES "${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Point it to the export file from a native build") -- INCLUDE(${IMPORT_EXECUTABLES}) --ENDIF(CMAKE_CROSSCOMPILING) -- --# only build the generator if not crosscompiling --IF(NOT CMAKE_CROSSCOMPILING) -- add_executable(generate_translations_header generate_translations_header.c) --ENDIF(NOT CMAKE_CROSSCOMPILING) -- --if(LRELEASE_PATH STREQUAL "") -- find_program(LRELEASE lrelease) --else() -- set(LRELEASE ${LRELEASE_PATH}/lrelease) --endif() -- --if(LRELEASE STREQUAL "LRELEASE-NOTFOUND") -- set(ts_files "") -- message(WARNING "lrelease program not found, translation files not built") --else() -- execute_process(COMMAND ${LRELEASE} -version -- RESULT_VARIABLE lrelease_ret) -- if(NOT lrelease_ret EQUAL "0") -- set(ts_files "") -- message(WARNING "lrelease program not working, translation files not built") -- else() -- file(GLOB ts_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.ts) -- foreach(ts_file ${ts_files}) -- string(REPLACE ".ts" ".qm" qm_file "${ts_file}") -- add_custom_command(TARGET generate_translations_header -- PRE_BUILD -- COMMAND ${LRELEASE} "${CMAKE_CURRENT_SOURCE_DIR}/${ts_file}" -qm "${qm_file}" -- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}") -- endforeach() -- endif() --endif() -- --string(REPLACE ".ts" ".qm" qm_files "${ts_files}") -- --add_custom_command(TARGET generate_translations_header -- POST_BUILD -- COMMAND $ ${qm_files} -- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}" -- COMMENT "Generating embedded translations header") -- --# export the generator target to a file, so it can be imported (see above) by another build --IF(NOT CMAKE_CROSSCOMPILING) -- EXPORT(TARGETS generate_translations_header FILE ${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake ) --ENDIF(NOT CMAKE_CROSSCOMPILING) -+add_custom_target(generate_translations_header) -+ -+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/translation_files.h" -+"#ifndef TRANSLATION_FILES_H -+#define TRANSLATION_FILES_H -+ -+#include -+ -+static const struct embedded_file { -+ const std::string *name; -+ const std::string *data; -+} embedded_files[] = { -+ {NULL, NULL} -+}; -+ -+static bool find_embedded_file(const std::string &name, std::string &data) { -+ const struct embedded_file *p; -+ for (p = embedded_files; p->name != NULL; p++) { -+ if (*p->name == name) { -+ data = *p->data; -+ return true; -+ } -+ } -+ return false; -+} -+ -+#endif /* TRANSLATION_FILES_H */ -+") --- -2.50.1 (Apple Git-155) - diff --git a/patches/monero/0020-depends-remove-icu4c-monero-project-monero-8880.patch b/patches/monero/0020-depends-remove-icu4c-monero-project-monero-8880.patch deleted file mode 100644 index 34172b6..0000000 --- a/patches/monero/0020-depends-remove-icu4c-monero-project-monero-8880.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c1d4ec80ec32232d2e70074afd8830754a752d70 Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Tue, 3 Mar 2026 13:55:59 +0100 -Subject: [PATCH] depends: remove icu4c monero-project/monero#8880 - ---- - CMakeLists.txt | 4 ++-- - src/common/perf_timer.h | 1 + - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 10c80dbad..2525cf8ba 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1123,9 +1123,9 @@ if(MINGW) - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj") - set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt) - if(DEPENDS) -- set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv) -+ set(ICU_LIBRARIES iconv) - else() -- set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv) -+ set(ICU_LIBRARIES iconv) - endif() - elseif(APPLE OR OPENBSD OR ANDROID) - set(EXTRA_LIBRARIES "") -diff --git a/src/common/perf_timer.h b/src/common/perf_timer.h -index c6120b06d..a96da6e56 100644 ---- a/src/common/perf_timer.h -+++ b/src/common/perf_timer.h -@@ -28,6 +28,7 @@ - - #pragma once - -+#include - #include - #include - #include --- -2.51.0 - diff --git a/patches/monero/0021-fix-mingw-build-issues.patch b/patches/monero/0021-fix-mingw-build-issues.patch deleted file mode 100644 index 50d6a43..0000000 --- a/patches/monero/0021-fix-mingw-build-issues.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ff7287c028327294a28f4521bf6c05721403016d Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Wed, 4 Mar 2026 14:52:14 +0100 -Subject: [PATCH] fix: mingw build issues - ---- - contrib/epee/include/serialization/keyvalue_serialization.h | 1 + - contrib/epee/src/abstract_http_client.cpp | 3 ++- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/contrib/epee/include/serialization/keyvalue_serialization.h b/contrib/epee/include/serialization/keyvalue_serialization.h -index fbbddc7d2..5104f284d 100644 ---- a/contrib/epee/include/serialization/keyvalue_serialization.h -+++ b/contrib/epee/include/serialization/keyvalue_serialization.h -@@ -26,6 +26,7 @@ - - #pragma once - -+#include - #include - #include - #include -diff --git a/contrib/epee/src/abstract_http_client.cpp b/contrib/epee/src/abstract_http_client.cpp -index 03f73cbbc..70c18cfca 100644 ---- a/contrib/epee/src/abstract_http_client.cpp -+++ b/contrib/epee/src/abstract_http_client.cpp -@@ -2,6 +2,7 @@ - #include "net/http_base.h" - #include "net/net_parse_helpers.h" - #include "misc_log_ex.h" -+#include - - #undef MONERO_DEFAULT_LOG_CATEGORY - #define MONERO_DEFAULT_LOG_CATEGORY "net.http" -@@ -38,7 +39,7 @@ namespace net_utils - while (num_char >= radix) - { - temp = num_char % radix; -- num_char = (int)floor((float)num_char / (float)radix); -+ num_char = (int)std::floor((float)num_char / (float)radix); - csTmp = get_hex_vals()[temp]; - } - --- -2.51.0 - diff --git a/patches/monero/0022-fix-remove-flaky-test.patch b/patches/monero/0022-fix-remove-flaky-test.patch deleted file mode 100644 index 4c70ca3..0000000 --- a/patches/monero/0022-fix-remove-flaky-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3855cc39761321650484f5fba70c48dd8eb18444 Mon Sep 17 00:00:00 2001 -From: Czarek Nakamoto -Date: Thu, 5 Mar 2026 18:12:53 +0100 -Subject: [PATCH] fix: remove flaky test - ---- - CMakeLists.txt | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2525cf8ba..42189c0fe 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -235,9 +235,7 @@ add_library(l3 OBJECT incorrect_source.cpp) - "-DCMAKE_MODULE_LINKER_FLAGS=${CMAKE_MODULE_LINKER_FLAGS}" - "-DEXPECT_SUCCESS=${EXPECT}" - ) -- if (NOT ${SUCCESS} STREQUAL ${EXPECT}) -- message(FATAL_ERROR "Undefined symbols test failure: expect(${EXPECT}), success(${SUCCESS})") -- endif() -+ - file(REMOVE_RECURSE "${TEST_PROJECT}") - endforeach() - endfunction() --- -2.51.0 - -- cgit v1.2.3