diff options
Diffstat (limited to 'patches/monero')
22 files changed, 564 insertions, 251 deletions
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 4dc4e8f..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 <cyjan@mrcyjanek.net> 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 ce72c9bb9cb799e0d9171094b9abb009e04c5bfc ++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..8ecd8b1 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 <cyjan@mrcyjanek.net> 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,15 @@ 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/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 +58,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 +94,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 +120,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::vector<stri + clearStatus(); + // Pause refresh thread while creating transaction + pauseRefresh(); +- ++ + cryptonote::address_parse_info info; + + uint32_t adjusted_priority = m_wallet->adjust_priority(static_cast<uint32_t>(priority)); @@ -2448,10 +2449,10 @@ void WalletImpl::refreshThreadFunc() } @@ -87,13 +203,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 +212,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 +224,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 +233,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 +244,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 +275,10 @@ index 1f199a72c..ac7ce2f6a 100644 std::atomic<int> m_refreshIntervalMillis; std::atomic<bool> 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 +286,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::optional<epee::net_u +@@ -1415,6 +1416,14 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u return ret; } //---------------------------------------------------------------------------------------------------- @@ -173,7 +301,7 @@ index dfb8b23cb..c9c2dbc82 100644 bool wallet2::set_proxy(const std::string &address) { return m_http_client->set_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 +311,7 @@ index dfb8b23cb..c9c2dbc82 100644 uint64_t next_blocks_start_height; std::vector<cryptonote::block_complete_entry> 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 +323,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 +332,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 <cyjan@mrcyjanek.net> 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 <string> -- -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 <cyjan@mrcyjanek.net> 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 <tob@featherwallet.org> 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<uint32_t, uint64_t> wallet2::balance_per_subaddress(uint32_t index_major, bool strict) const { std::map<uint32_t, uint64_t> amount_per_subaddr; -@@ -7848,9 +7877,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin +@@ -7916,9 +7945,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin crypto::key_derivation derivation; std::vector<crypto::key_derivation> additional_derivations; @@ -811,7 +802,7 @@ index b827b826f..765cefb32 100644 std::vector<crypto::public_key> additional_tx_pub_keys; for (const crypto::secret_key &skey: txs[n].additional_tx_keys) { -@@ -11246,7 +11273,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp +@@ -11261,7 +11288,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold)); continue; } @@ -820,7 +811,7 @@ index b827b826f..765cefb32 100644 { if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below) { -@@ -11296,9 +11323,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp +@@ -11311,9 +11338,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp LOG_PRINT_L2("Starting with " << num_nondust_outputs << " non-dust outputs and " << num_dust_outputs << " dust outputs"); @@ -838,7 +829,7 @@ index b827b826f..765cefb32 100644 // if empty, put dummy entry so that the front can be referenced later in the loop if (unused_dust_indices_per_subaddr.empty()) unused_dust_indices_per_subaddr.push_back({}); -@@ -13934,33 +13967,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle +@@ -13949,33 +13982,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle bool wallet2::export_key_images(const std::string &filename, bool all) const { @@ -902,7 +893,7 @@ index b827b826f..765cefb32 100644 //---------------------------------------------------------------------------------------------------- std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> wallet2::export_key_images(bool all) const { -@@ -14015,53 +14055,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>> +@@ -14030,53 +14070,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>> 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<uint32_t, uint64_t> balance_per_subaddress(uint32_t subaddr_index_major, bool strict) const; std::map<uint32_t, std::pair<uint64_t, std::pair<uint64_t, uint64_t>>> unlocked_balance_per_subaddress(uint32_t subaddr_index_major, bool strict); -@@ -1631,9 +1632,11 @@ private: +@@ -1639,9 +1640,11 @@ private: std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> export_blockchain() const; void import_blockchain(const std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> &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 <cyjan@mrcyjanek.net> 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<std::string> 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 <tob@featherwallet.org> Date: Tue, 12 Mar 2024 09:42:37 +0100 -Subject: [PATCH 07/17] polyseed +Subject: [PATCH 07/20] polyseed Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net> --- @@ -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::keys_file_data> wallet2::get_keys_file_data(const crypt +@@ -4877,6 +4893,9 @@ boost::optional<wallet2::keys_file_data> 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<const char*>(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<size_t> select_available_outputs_from_histogram(uint64_t count, bool atleast, bool unlocked, bool allow_rct); std::vector<size_t> select_available_outputs(const std::function<bool(const transfer_details &td)> &f); std::vector<size_t> 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<std::string> &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<crypto::public_key> 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 <tob@featherwallet.org> 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<std::string> &args_, bool ca +@@ -6917,7 +6917,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &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<cryptonote::tx_destination_entry +@@ -10526,7 +10549,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry LOG_PRINT_L2("transfer_selected_rct done"); } @@ -966,7 +966,7 @@ index 806de969a..8720e18b1 100644 { std::vector<size_t> picks; float current_output_relatdness = 1.0f; -@@ -10522,6 +10545,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui +@@ -10537,6 +10560,9 @@ std::vector<size_t> 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<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui +@@ -10557,6 +10583,9 @@ std::vector<size_t> 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<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui +@@ -10568,6 +10597,9 @@ std::vector<size_t> 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::pending_tx> wallet2::create_transactions_2(std::vector<cryp +@@ -11348,6 +11380,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp for (size_t i = 0; i < m_transfers.size(); ++i) { const transfer_details& td = m_transfers[i]; @@ -1015,7 +1015,7 @@ index 806de969a..8720e18b1 100644 if (m_ignore_fractional_outputs && td.amount() < fractional_threshold) { MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold)); -@@ -11424,7 +11459,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp +@@ -11439,7 +11474,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp // will get us a known fee. uint64_t estimated_fee = estimate_fee(use_per_byte_fee, use_rct, 2, fake_outs_count, 2, extra.size(), bulletproof, clsag, bulletproof_plus, use_view_tags, base_fee, fee_quantization_mask); total_needed_money = needed_money + (subtract_fee_from_outputs.size() ? 0 : estimated_fee); @@ -1024,7 +1024,7 @@ index 806de969a..8720e18b1 100644 if (!preferred_inputs.empty()) { string s; -@@ -11903,7 +11938,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c +@@ -11918,7 +11953,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c return true; } @@ -1033,7 +1033,7 @@ index 806de969a..8720e18b1 100644 { std::vector<size_t> unused_transfers_indices; std::vector<size_t> unused_dust_indices; -@@ -11932,6 +11967,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below +@@ -11947,6 +11982,9 @@ std::vector<wallet2::pending_tx> 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<tools::wallet2::pending_tx> &ptx, std::function<bool(const signed_tx_set&)> accept_func = NULL); bool parse_tx_from_str(const std::string &signed_tx_st, std::vector<tools::wallet2::pending_tx> &ptx, std::function<bool(const signed_tx_set &)> accept_func); @@ -1058,7 +1058,7 @@ index a619bdd15..4f324c238 100644 std::vector<wallet2::pending_tx> 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<uint8_t>& extra); std::vector<wallet2::pending_tx> create_transactions_from(const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, std::vector<size_t> unused_transfers_indices, std::vector<size_t> unused_dust_indices, const size_t fake_outs_count, uint32_t priority, const std::vector<uint8_t>& extra); bool sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, const std::vector<cryptonote::tx_destination_entry>& 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<uint64_t> 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 <m@cakewallet.com> 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 <konstantinullrich12@gmail.com> 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 <godilite@gmail.com> 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 <cyjan@mrcyjanek.net> 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 <cyjan@mrcyjanek.net> 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 <cyjan@mrcyjanek.net> 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 <cyjan@mrcyjanek.net> 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<std::string> 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<uint64_t>::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 <cyjan@mrcyjanek.net> 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<const std::uint8_t*>(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 <cyjan@mrcyjanek.net> -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/0018-serialize-cache-to-JSON.patch b/patches/monero/0016-serialize-cache-to-JSON.patch index dbec2f2..38aaee4 100644 --- a/patches/monero/0018-serialize-cache-to-JSON.patch +++ b/patches/monero/0016-serialize-cache-to-JSON.patch @@ -1,7 +1,7 @@ -From 7c1d576901a56b7c315b2c54362f7985ff8df753 Mon Sep 17 00:00:00 2001 +From e6785290c24eb48d6b6aec8e1831b96f65cd3bfd Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> Date: Tue, 12 Aug 2025 07:09:14 -0400 -Subject: [PATCH] serialize cache to JSON +Subject: [PATCH 16/20] serialize cache to JSON --- src/wallet/CMakeLists.txt | 1 + @@ -26,10 +26,10 @@ index b163212b7..196ad671f 100644 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 +index 107f516f3..c24b4a97d 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 +@@ -3474,4 +3474,9 @@ void Wallet::setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command #endif } @@ -67,10 +67,10 @@ index fcb8187d4..3d11929f9 100644 /** diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index 4f324c238..bc4abc672 100644 +index d07dc7e8b..37a2447d2 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h -@@ -1429,6 +1429,12 @@ private: +@@ -1436,6 +1436,12 @@ private: FIELD(m_background_sync_data) END_SERIALIZE() @@ -85,7 +85,7 @@ index 4f324c238..bc4abc672 100644 * \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 +index 000000000..4743852ca --- /dev/null +++ b/src/wallet/wallet_cache_to_json.cpp @@ -0,0 +1,368 @@ @@ -123,14 +123,14 @@ index 000000000..64687a7a6 + 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) { @@ -143,10 +143,10 @@ index 000000000..64687a7a6 + 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)) { @@ -158,10 +158,10 @@ index 000000000..64687a7a6 + 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(); @@ -170,7 +170,7 @@ index 000000000..64687a7a6 + } + } + } -+ ++ + pos = colon_pos + 1; + } +} @@ -459,5 +459,5 @@ index 000000000..64687a7a6 +} // namespace tools \ No newline at end of file -- -2.50.1 +2.50.1 (Apple Git-155) diff --git a/patches/monero/0017-drop-generate_translations_header.c-requirement.patch b/patches/monero/0017-drop-generate_translations_header.c-requirement.patch new file mode 100644 index 0000000..f6549dc --- /dev/null +++ b/patches/monero/0017-drop-generate_translations_header.c-requirement.patch @@ -0,0 +1,123 @@ +From 6aa368c9613a1a7b7f2f1ce1f025962d40827c67 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Fri, 20 Feb 2026 08:03:01 +0100 +Subject: [PATCH 17/20] drop generate_translations_header.c requirement + +--- + CMakeLists.txt | 9 +---- + translations/CMakeLists.txt | 79 +++++++++++++------------------------ + 2 files changed, 30 insertions(+), 58 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cef44dd1b..ce5e1b557 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -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 $<TARGET_FILE:generate_translations_header> ${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 <string> ++ ++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/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 <cyjan@mrcyjanek.net> -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<class t_array> -+#ifdef __APPLE__ -+ struct array_hasher: std::__unary_function<t_array&, std::size_t> -+#else - struct array_hasher: std::unary_function<t_array&, std::size_t> -+#endif - { - std::size_t operator()(const t_array& val) const - { --- -2.49.0 - diff --git a/patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch b/patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch new file mode 100644 index 0000000..84b4b99 --- /dev/null +++ b/patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch @@ -0,0 +1,39 @@ +From 960a5efe59725eab4c03ce8025de8fc0fbffaacf Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Tue, 3 Mar 2026 13:55:59 +0100 +Subject: [PATCH 18/20] depends: remove icu4c monero-project/monero#8880 + +--- + CMakeLists.txt | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ce5e1b557..25e034301 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1117,20 +1117,15 @@ 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() + # This is an extremely ugly hack to get around Boost not being built with static ICU. + # We reported the issue, we are waiting for upstream to fix this issue: https://github.com/boostorg/boost/issues/1079#issue-3384962885 + # This hack links shared ICU libs to avoid linker errors we get in MSYS2 compilation (undefined symbols to ICU). + set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a") +- find_library(ICUIO_LIBRARIES NAMES icuio REQUIRED) +- find_library(ICUIN_LIBRARIES NAMES icuin REQUIRED) +- find_library(ICUUC_LIBRARIES NAMES icuuc REQUIRED) +- find_library(ICUDT_LIBRARIES NAMES icudt REQUIRED) +- find_library(ICUTU_LIBRARIES NAMES icutu REQUIRED) + find_library(ICONV_LIBRARIES NAMES iconv REQUIRED) +- set(ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICUIN_LIBRARIES} ${ICUUC_LIBRARIES} ${ICUDT_LIBRARIES} ${ICUTU_LIBRARIES} ${ICONV_LIBRARIES}) ++ set(ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICONV_LIBRARIES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) + endif() + elseif(APPLE OR OPENBSD OR ANDROID) +-- +2.50.1 (Apple Git-155) + diff --git a/patches/monero/0019-fix-mingw-build-issues.patch b/patches/monero/0019-fix-mingw-build-issues.patch new file mode 100644 index 0000000..a9e7b5c --- /dev/null +++ b/patches/monero/0019-fix-mingw-build-issues.patch @@ -0,0 +1,46 @@ +From 2d4ed0b13eea96b25a574e8a87644df75c16ffb0 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Wed, 4 Mar 2026 14:52:14 +0100 +Subject: [PATCH 19/20] 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 <cstdint> + #include <type_traits> + #include <boost/utility/value_init.hpp> + #include <boost/foreach.hpp> +diff --git a/contrib/epee/src/abstract_http_client.cpp b/contrib/epee/src/abstract_http_client.cpp +index ed4a193d9..2352c7d62 100644 +--- a/contrib/epee/src/abstract_http_client.cpp ++++ b/contrib/epee/src/abstract_http_client.cpp +@@ -3,6 +3,7 @@ + #include "net/http_base.h" + #include "net/net_parse_helpers.h" + #include "misc_log_ex.h" ++#include <cmath> + + #undef MONERO_DEFAULT_LOG_CATEGORY + #define MONERO_DEFAULT_LOG_CATEGORY "net.http" +@@ -39,7 +40,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.50.1 (Apple Git-155) + diff --git a/patches/monero/0020-fix-remove-flaky-test.patch b/patches/monero/0020-fix-remove-flaky-test.patch new file mode 100644 index 0000000..1075db5 --- /dev/null +++ b/patches/monero/0020-fix-remove-flaky-test.patch @@ -0,0 +1,27 @@ +From 81eb38a5add85266cc0d2aa39ecba9d62337f4b1 Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto <cyjan@mrcyjanek.net> +Date: Thu, 5 Mar 2026 18:12:53 +0100 +Subject: [PATCH 20/20] fix: remove flaky test + +--- + CMakeLists.txt | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 25e034301..19417f072 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.50.1 (Apple Git-155) + |
