From 90658235f6ff166e8252dbb17e798c73c9d77ac2 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 22 Apr 2024 09:33:21 +0200 Subject: [PATCH] update polyseed commit change POLYSEED_COIN to wownero in the fork update wownero patches --- apply_patches.sh | 2 +- patches/monero/0001-polyseed.patch | 2 +- ...ompilation-target-https-git.wownero..patch | 2 +- ...seed-support.patch => 0002-polyseed.patch} | 72 ++++++++-------- ...ckground-sync-with-just-the-view-key.patch | 85 ++++++++++--------- patches/wownero/0004-airgap.patch | 10 +-- patches/wownero/0005-coin-control.patch | 10 +-- patches/wownero/0006-fix-build.patch | 2 +- patches/wownero/0007-macos-build-fix.patch | 2 +- .../0008-FIX-wallet-listener-crashing.patch | 4 +- ...g-___clear_cache-when-targetting-iOS.patch | 6 +- 11 files changed, 100 insertions(+), 97 deletions(-) rename patches/wownero/{0002-polyseed-support.patch => 0002-polyseed.patch} (97%) diff --git a/apply_patches.sh b/apply_patches.sh index 2671d46..e8e090e 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -28,7 +28,7 @@ fi set -e cd $repo -git am ../patches/$repo/*.patch +git am -3 ../patches/$repo/*.patch if [[ "$repo" == "wownero" ]]; then pushd external/randomwow diff --git a/patches/monero/0001-polyseed.patch b/patches/monero/0001-polyseed.patch index 5a39c36..2a28d03 100644 --- a/patches/monero/0001-polyseed.patch +++ b/patches/monero/0001-polyseed.patch @@ -154,7 +154,7 @@ index 000000000..b7c35bb3c --- /dev/null +++ b/external/polyseed @@ -0,0 +1 @@ -+Subproject commit b7c35bb3c6b91e481ecb04fc235eaff69c507fa1 ++Subproject commit 9d4f1a032585656e1a642ee70cdf929001badba6 diff --git a/external/utf8proc b/external/utf8proc new file mode 160000 index 000000000..1cb28a66c diff --git a/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch b/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch index 6a6c697..47e0168 100644 --- a/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch +++ b/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch @@ -1,4 +1,4 @@ -From f0f386f43d6fc998c93ecb12666688d85a4d6fca Mon Sep 17 00:00:00 2001 +From 65bba6df70902a6783f3a179c7fe049a1293c9c2 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 26 Mar 2024 06:55:38 +0100 Subject: [PATCH 1/9] Fix wallet_api compilation target diff --git a/patches/wownero/0002-polyseed-support.patch b/patches/wownero/0002-polyseed.patch similarity index 97% rename from patches/wownero/0002-polyseed-support.patch rename to patches/wownero/0002-polyseed.patch index 698b5ef..c607ecc 100644 --- a/patches/wownero/0002-polyseed-support.patch +++ b/patches/wownero/0002-polyseed.patch @@ -1,7 +1,7 @@ -From 33d611538efef134106f427c7ee5535d28d588f6 Mon Sep 17 00:00:00 2001 +From b5f23b131c6eaaf6b2a772e63b9e236eb0c90d72 Mon Sep 17 00:00:00 2001 From: tobtoht -Date: Tue, 26 Mar 2024 08:19:23 +0100 -Subject: [PATCH 2/9] polyseed support +Date: Tue, 12 Mar 2024 09:42:37 +0100 +Subject: [PATCH 2/9] polyseed Co-authored-by: Czarek Nakamoto --- @@ -55,22 +55,22 @@ index 4c1e381c0..70bea03b3 100644 test-ubuntu: needs: build-ubuntu diff --git a/.gitmodules b/.gitmodules -index 74571d5ee..86009b6b6 100644 +index 74571d5ee..1c469941e 100644 --- a/.gitmodules +++ b/.gitmodules -@@ -12,6 +12,12 @@ - path = external/supercop - url = https://github.com/monero-project/supercop - branch = monero +@@ -8,6 +8,12 @@ + active = false + path = external/trezor-common + url = https://github.com/trezor/trezor-common.git +[submodule "external/utf8proc"] + path = external/utf8proc + url = https://github.com/JuliaStrings/utf8proc.git +[submodule "external/polyseed"] + path = external/polyseed + url = https://github.com/tevador/polyseed.git - [submodule "external/randomwow"] - path = external/randomwow - url = https://git.wownero.com/wownero/RandomWOW + [submodule "external/supercop"] + path = external/supercop + url = https://github.com/monero-project/supercop diff --git a/CMakeLists.txt b/CMakeLists.txt index 20829bc30..2dd427d3d 100644 --- a/CMakeLists.txt @@ -138,7 +138,7 @@ index b016f2f48..f2f365b1b 100644 + } diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt -index 29aed0cc6..c023abffa 100644 +index 29aed0cc6..04910a4fc 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -70,3 +70,5 @@ add_subdirectory(db_drivers) @@ -147,21 +147,20 @@ index 29aed0cc6..c023abffa 100644 add_subdirectory(randomwow EXCLUDE_FROM_ALL) +add_subdirectory(polyseed EXCLUDE_FROM_ALL) +add_subdirectory(utf8proc EXCLUDE_FROM_ALL) -\ No newline at end of file diff --git a/external/polyseed b/external/polyseed new file mode 160000 -index 000000000..b7c35bb3c +index 000000000..9d4f1a032 --- /dev/null +++ b/external/polyseed @@ -0,0 +1 @@ -+Subproject commit b7c35bb3c6b91e481ecb04fc235eaff69c507fa1 ++Subproject commit 9d4f1a032585656e1a642ee70cdf929001badba6 diff --git a/external/utf8proc b/external/utf8proc new file mode 160000 -index 000000000..1fe43f5a6 +index 000000000..1cb28a66c --- /dev/null +++ b/external/utf8proc @@ -0,0 +1 @@ -+Subproject commit 1fe43f5a6d9c628f717c5ec8aeaeae4a9adfd167 ++Subproject commit 1cb28a66ca79a0845e99433fd1056257456cef8b diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9216bcaa5..c043ba150 100644 --- a/src/CMakeLists.txt @@ -278,14 +277,14 @@ index 2ee9545d4..0099ebfe7 100644 const account_keys& get_keys() const; std::string get_public_address_str(network_type nettype) const; diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h -index 8c0d3ce20..1c1830ad4 100644 +index 8c0d3ce20..5b36c70de 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -219,6 +219,8 @@ #define DNS_BLOCKLIST_LIFETIME (86400 * 8) -+#define POLYSEED_COIN POLYSEED_MONERO ++#define POLYSEED_COIN POLYSEED_WOWNERO + //The limit is enough for the mandatory transaction content with 16 outputs (547 bytes), //a custom tag (1 byte) and up to 32 bytes of custom data for each recipient. @@ -468,7 +467,7 @@ index 000000000..f6253b9d7 \ No newline at end of file diff --git a/src/polyseed/polyseed.cpp b/src/polyseed/polyseed.cpp new file mode 100644 -index 000000000..b26f37574 +index 000000000..0a8852777 --- /dev/null +++ b/src/polyseed/polyseed.cpp @@ -0,0 +1,182 @@ @@ -517,14 +516,14 @@ index 000000000..b26f37574 + utf8proc_ssize_t result; + + result = utf8proc_decompose(reinterpret_cast(str), 0, buffer, POLYSEED_STR_SIZE, options); -+ if (result < 0) { -+ return POLYSEED_STR_SIZE; ++ if (result < 0 || result > (POLYSEED_STR_SIZE - 1)) { ++ throw std::runtime_error("Unicode normalization failed"); + } -+ if (result > POLYSEED_STR_SIZE - 1) { -+ return result; -+ } -+ ++ + result = utf8proc_reencode(buffer, result, options); ++ if (result < 0 || result > POLYSEED_STR_SIZE) { ++ throw std::runtime_error("Unicode normalization failed"); ++ } + + strcpy(norm, reinterpret_cast(buffer)); + sodium_memzero(buffer, POLYSEED_STR_SIZE); @@ -829,7 +828,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 d81ddec93..db9c2b5d9 100644 +index d81ddec93..ceb0bcb8b 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -683,6 +683,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p @@ -876,7 +875,7 @@ index d81ddec93..db9c2b5d9 100644 + } + + bool result = m_wallet->get_polyseed(seed_words_epee, passphrase_epee); -+ ++ + seed_words.assign(seed_words_epee.data(), seed_words_epee.size()); + passphrase.assign(passphrase_epee.data(), passphrase_epee.size()); + @@ -898,7 +897,7 @@ index d81ddec93..db9c2b5d9 100644 +bool Wallet::createPolyseed(std::string &seed_words, std::string &err, const std::string &language) +{ + epee::wipeable_string seed_words_epee(seed_words.c_str(), seed_words.size()); -+ ++ + try { + polyseed::data polyseed(POLYSEED_COIN); + polyseed.create(0); @@ -1026,7 +1025,7 @@ index 206aedc14..e3149300c 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 e586d67f7..83aba6253 100644 +index e586d67f7..dfcc206a0 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -92,6 +92,7 @@ using namespace epee; @@ -1084,10 +1083,12 @@ index e586d67f7..83aba6253 100644 // Serialize the JSON object rapidjson::StringBuffer buffer; rapidjson::Writer writer(buffer); -@@ -4860,6 +4880,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st +@@ -4859,7 +4879,8 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st + m_auto_mine_for_rpc_payment_threshold = -1.0f; m_credits_target = 0; m_enable_multisig = false; - m_allow_mismatched_daemon_version = true; +- m_allow_mismatched_daemon_version = true; ++ m_allow_mismatched_daemon_version = false; + m_polyseed = false; } else if(json.IsObject()) @@ -1168,18 +1169,15 @@ index e586d67f7..83aba6253 100644 uint64_t target_height = get_daemon_blockchain_target_height(err); if (err.empty()) { if (target_height < height) -@@ -13546,9 +13611,9 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err) +@@ -13546,7 +13611,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err) return target_height; } -uint64_t wallet2::get_approximate_blockchain_height() const +uint64_t wallet2::get_approximate_blockchain_height(uint64_t t) const { -- uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/307; -+ uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : ((t > 0 ? t : time(NULL)) - 1522624244)/307; + uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/307; LOG_PRINT_L2("Calculated blockchain height: " << approx_blockchain_height); - return approx_blockchain_height; - } @@ -15262,15 +15327,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) diff --git a/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch b/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch index 95a8cfa..e87a73c 100644 --- a/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch +++ b/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch @@ -1,4 +1,4 @@ -From 9d6099e9c47f7cbd12f4d6550d6fda520733c2c5 Mon Sep 17 00:00:00 2001 +From ebd0430956c71356ffa3ae0f5cbc90a749ceabc7 Mon Sep 17 00:00:00 2001 From: j-berman Date: Thu, 13 Oct 2022 18:33:33 -0700 Subject: [PATCH 3/9] wallet: background sync with just the view key @@ -32,11 +32,11 @@ cache. src/cryptonote_config.h | 2 + src/simplewallet/simplewallet.cpp | 205 +++- src/simplewallet/simplewallet.h | 1 + - src/wallet/api/wallet.cpp | 230 +++- + src/wallet/api/wallet.cpp | 231 +++- src/wallet/api/wallet.h | 12 + - src/wallet/api/wallet2_api.h | 41 + - src/wallet/wallet2.cpp | 1029 ++++++++++++++++-- - src/wallet/wallet2.h | 155 ++- + src/wallet/api/wallet2_api.h | 42 + + src/wallet/wallet2.cpp | 1031 ++++++++++++++++-- + src/wallet/wallet2.h | 156 ++- src/wallet/wallet_errors.h | 39 + src/wallet/wallet_rpc_server.cpp | 162 +++ src/wallet/wallet_rpc_server.h | 6 + @@ -47,7 +47,7 @@ cache. tests/functional_tests/wallet.py | 43 +- tests/unit_tests/wipeable_string.cpp | 12 + utils/python-rpc/framework/wallet.py | 42 + - 20 files changed, 2350 insertions(+), 132 deletions(-) + 20 files changed, 2354 insertions(+), 133 deletions(-) diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp index 4931c3740..2d556f285 100644 @@ -84,7 +84,7 @@ index 0099ebfe7..1f76febce 100644 void encrypt_keys(const crypto::chacha_key &key) { m_keys.encrypt(key); } diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h -index 1c1830ad4..a192bd64d 100644 +index 5b36c70de..d9151e8d2 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -255,6 +255,8 @@ namespace config @@ -748,7 +748,7 @@ index 8e3477ba3..ae1aa312b 100644 bool set_show_detailed_prompt(const std::vector &args = std::vector()); bool set_inactivity_lock_timeout(const std::vector &args = std::vector()); diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index db9c2b5d9..5ef3132d2 100644 +index ceb0bcb8b..bf8a95ffe 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -56,6 +56,40 @@ using namespace cryptonote; @@ -1167,7 +1167,7 @@ index db9c2b5d9..5ef3132d2 100644 void WalletImpl::clearStatus() const { boost::lock_guard l(m_statusMutex); -@@ -2670,11 +2857,22 @@ void WalletImpl::doRefresh() +@@ -2670,11 +2857,23 @@ void WalletImpl::doRefresh() boost::lock_guard guarg(m_refreshMutex2); do try { LOG_PRINT_L3(__FUNCTION__ << ": doRefresh, rescan = "<refresh(true); - if (!m_synchronized) { - m_synchronized = true; ++ + // Syncing daemon and refreshing wallet simultaneously is very resource intensive. + // Disable refresh if wallet is disconnected or daemon isn't synced. + if (m_wallet->light_wallet() || daemonSynced()) { @@ -1195,7 +1196,7 @@ index db9c2b5d9..5ef3132d2 100644 } // assuming if we have empty history, it wasn't initialized yet // for further history changes client need to update history in -@@ -2784,6 +2982,24 @@ bool WalletImpl::doInit(const string &daemon_address, const std::string &proxy_a +@@ -2784,6 +2983,24 @@ bool WalletImpl::doInit(const string &daemon_address, const std::string &proxy_a return true; } @@ -1220,7 +1221,7 @@ index db9c2b5d9..5ef3132d2 100644 bool WalletImpl::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) { return m_wallet->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error); -@@ -2802,6 +3018,8 @@ std::string WalletImpl::getDefaultDataDir() const +@@ -2802,6 +3019,8 @@ std::string WalletImpl::getDefaultDataDir() const bool WalletImpl::rescanSpent() { clearStatus(); @@ -1267,7 +1268,7 @@ index 28135c82a..fc6341861 100644 std::unique_ptr m_history; std::unique_ptr m_wallet2Callback; diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index a0ed60a39..626c63fc5 100644 +index a0ed60a39..db5509227 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -544,6 +544,12 @@ struct Wallet @@ -1283,10 +1284,10 @@ index a0ed60a39..626c63fc5 100644 virtual ~Wallet() = 0; virtual std::string seed(const std::string& seed_offset = "") const = 0; virtual std::string getSeedLanguage() const = 0; -@@ -1094,6 +1100,41 @@ struct Wallet - virtual std::string printScannedPoolTxs() = 0; +@@ -1095,6 +1101,42 @@ struct Wallet virtual bool importTransaction(const std::string &txid, std::vector &o_indices, uint64_t height, uint8_t block_version, uint64_t ts, bool miner_tx, bool pool, bool double_spend_seen) = 0; + + /*! + * \brief setupBackgroundSync - setup background sync mode with just a view key + * \param background_sync_type - the mode the wallet background syncs in @@ -1322,11 +1323,12 @@ index a0ed60a39..626c63fc5 100644 + * @brief isBackgroundWallet - returns true if the wallet is a background wallet + */ + virtual bool isBackgroundWallet() const = 0; - ++ virtual TransactionHistory * history() = 0; virtual AddressBook * addressBook() = 0; + virtual Coins * coins() = 0; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index 83aba6253..d7e2a9699 100644 +index dfcc206a0..e013313b9 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -158,6 +158,8 @@ static const std::string MULTISIG_SIGNATURE_MAGIC = "SigMultisigPkV1"; @@ -1364,18 +1366,18 @@ index 83aba6253..d7e2a9699 100644 { locked = false; return; -@@ -1235,6 +1237,11 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std +@@ -1233,6 +1235,11 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std + m_ignore_outputs_above(MONEY_SUPPLY), + m_ignore_outputs_below(0), m_track_uses(false), - m_show_wallet_name_when_locked(true), - m_show_detailed_prompt(true), + m_is_background_wallet(false), + m_background_sync_type(BackgroundSyncOff), + m_background_syncing(false), + m_processing_background_cache(false), + m_custom_background_key(boost::none), + m_show_wallet_name_when_locked(true), + m_show_detailed_prompt(true), m_inactivity_lock_timeout(DEFAULT_INACTIVITY_LOCK_TIMEOUT), - m_setup_background_mining(BackgroundMiningNo), - m_persistent_rpc_client_id(false), @@ -1897,6 +1904,9 @@ bool has_nonrequested_tx_at_height_or_above_requested(uint64_t height, const std //---------------------------------------------------------------------------------------------------- void wallet2::scan_tx(const std::unordered_set &txids) @@ -1845,17 +1847,19 @@ index 83aba6253..d7e2a9699 100644 // The contents should be JSON if the wallet follows the new format. if (json.Parse(account_data.c_str()).HasParseError()) { -@@ -4864,6 +5090,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st +@@ -4862,7 +5088,8 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st + m_ignore_outputs_above = MONEY_SUPPLY; + m_ignore_outputs_below = 0; m_track_uses = false; - m_show_wallet_name_when_locked = true; - m_show_detailed_prompt = true; +- m_show_wallet_name_when_locked = true; + m_background_sync_type = BackgroundSyncOff; ++ m_show_wallet_name_when_locked = false; + m_show_detailed_prompt = true; m_inactivity_lock_timeout = DEFAULT_INACTIVITY_LOCK_TIMEOUT; m_setup_background_mining = BackgroundMiningNo; - m_subaddress_lookahead_major = SUBADDRESS_LOOKAHEAD_MAJOR; @@ -4881,6 +5108,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st m_enable_multisig = false; - m_allow_mismatched_daemon_version = true; + m_allow_mismatched_daemon_version = false; m_polyseed = false; + m_custom_background_key = boost::none; } @@ -2769,7 +2773,7 @@ index 83aba6253..d7e2a9699 100644 { payment_container payments; diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index db5c1feb3..2f2664f8e 100644 +index db5c1feb3..009dce766 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -257,6 +257,20 @@ private: @@ -2931,16 +2935,17 @@ index db5c1feb3..2f2664f8e 100644 bool show_wallet_name_when_locked() const { return m_show_wallet_name_when_locked; } void show_wallet_name_when_locked(bool value) { m_show_wallet_name_when_locked = value; } bool show_detailed_prompt() const { return m_show_detailed_prompt; } -@@ -1738,6 +1824,8 @@ private: - std::string printTxPrefix(const cryptonote::transaction_prefix &tx); +@@ -1739,6 +1825,9 @@ private: std::string printPaymentDetails(const payment_details &pd); std::string printTxDestinationEntry(const cryptonote::tx_destination_entry &tx); + + void start_background_sync(); + void stop_background_sync(const epee::wipeable_string &wallet_password, const crypto::secret_key &spend_secret_key = crypto::null_skey); - ++ // MMS ------------------------------------------------------------------------------------------------- mms::message_store& get_message_store() { return m_message_store; }; -@@ -1775,6 +1863,9 @@ private: + const mms::message_store& get_message_store() const { return m_message_store; }; +@@ -1775,6 +1864,9 @@ private: * \return Whether it was successful. */ bool store_keys(const std::string& keys_file_name, const epee::wipeable_string& password, bool watch_only = false); @@ -2950,7 +2955,7 @@ index db5c1feb3..2f2664f8e 100644 /*! * \brief Load wallet keys information from wallet file. * \param keys_file_name Name of wallet file -@@ -1788,6 +1879,7 @@ private: +@@ -1788,6 +1880,7 @@ private: */ bool load_keys_buf(const std::string& keys_buf, const epee::wipeable_string& password); bool load_keys_buf(const std::string& keys_buf, const epee::wipeable_string& password, boost::optional& keys_to_encrypt); @@ -2958,7 +2963,7 @@ index db5c1feb3..2f2664f8e 100644 void process_new_transaction(const crypto::hash &txid, const cryptonote::transaction& tx, const std::vector &o_indices, uint64_t height, uint8_t block_version, uint64_t ts, bool miner_tx, bool pool, bool double_spend_seen, const tx_cache_data &tx_cache_data, std::map, size_t> *output_tracker_cache = NULL, bool ignore_callbacks = false); bool should_skip_block(const cryptonote::block &b, uint64_t height) const; void process_new_blockchain_entry(const cryptonote::block& b, const cryptonote::block_complete_entry& bche, const parsed_block &parsed_block, const crypto::hash& bl_id, uint64_t height, const std::vector &tx_cache_data, size_t tx_cache_data_offset, std::map, size_t> *output_tracker_cache = NULL); -@@ -1796,6 +1888,15 @@ private: +@@ -1796,6 +1889,15 @@ private: void get_short_chain_history(std::list& ids, uint64_t granularity = 1) const; bool clear(); void clear_soft(bool keep_key_images=false); @@ -2974,7 +2979,7 @@ index db5c1feb3..2f2664f8e 100644 void pull_blocks(bool first, bool try_incremental, uint64_t start_height, uint64_t& blocks_start_height, const std::list &short_chain_history, std::vector &blocks, std::vector &o_indices, uint64_t ¤t_height); void pull_hashes(uint64_t start_height, uint64_t& blocks_start_height, const std::list &short_chain_history, std::vector &hashes); void fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, std::list &short_chain_history, bool force = false); -@@ -1847,10 +1948,23 @@ private: +@@ -1847,10 +1949,23 @@ private: bool get_ring(const crypto::chacha_key &key, const crypto::key_image &key_image, std::vector &outs); crypto::chacha_key get_ringdb_key(); void setup_keys(const epee::wipeable_string &password); @@ -2998,7 +3003,7 @@ index db5c1feb3..2f2664f8e 100644 void register_devices(); hw::device& lookup_device(const std::string & device_descriptor); -@@ -1966,6 +2080,8 @@ private: +@@ -1966,6 +2081,8 @@ private: uint64_t m_ignore_outputs_above; uint64_t m_ignore_outputs_below; bool m_track_uses; @@ -3007,7 +3012,7 @@ index db5c1feb3..2f2664f8e 100644 bool m_show_wallet_name_when_locked; bool m_show_detailed_prompt; uint32_t m_inactivity_lock_timeout; -@@ -2012,6 +2128,7 @@ private: +@@ -2012,6 +2129,7 @@ private: uint64_t m_last_block_reward; std::unique_ptr m_keys_file_locker; @@ -3015,7 +3020,7 @@ index db5c1feb3..2f2664f8e 100644 mms::message_store m_message_store; bool m_original_keys_available; -@@ -2019,6 +2136,7 @@ private: +@@ -2019,6 +2137,7 @@ private: crypto::secret_key m_original_view_secret_key; crypto::chacha_key m_cache_key; @@ -3023,7 +3028,7 @@ index db5c1feb3..2f2664f8e 100644 std::shared_ptr m_encrypt_keys_after_refresh; bool m_unattended; -@@ -2034,9 +2152,13 @@ private: +@@ -2034,9 +2153,13 @@ private: static boost::mutex default_daemon_address_lock; static std::string default_daemon_address; @@ -3038,7 +3043,7 @@ index db5c1feb3..2f2664f8e 100644 BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 12) BOOST_CLASS_VERSION(tools::wallet2::multisig_info, 1) BOOST_CLASS_VERSION(tools::wallet2::multisig_info::LR, 0) -@@ -2052,6 +2174,8 @@ BOOST_CLASS_VERSION(tools::wallet2::signed_tx_set, 1) +@@ -2052,6 +2175,8 @@ BOOST_CLASS_VERSION(tools::wallet2::signed_tx_set, 1) BOOST_CLASS_VERSION(tools::wallet2::tx_construction_data, 4) BOOST_CLASS_VERSION(tools::wallet2::pending_tx, 3) BOOST_CLASS_VERSION(tools::wallet2::multisig_sig, 1) @@ -3047,7 +3052,7 @@ index db5c1feb3..2f2664f8e 100644 namespace boost { -@@ -2550,6 +2674,29 @@ namespace boost +@@ -2550,6 +2675,29 @@ namespace boost return; a & x.multisig_sigs; } diff --git a/patches/wownero/0004-airgap.patch b/patches/wownero/0004-airgap.patch index b0c3c02..83b5a6b 100644 --- a/patches/wownero/0004-airgap.patch +++ b/patches/wownero/0004-airgap.patch @@ -1,4 +1,4 @@ -From 60c89b5c4e2e874e725915ed0a8b7709849ef140 Mon Sep 17 00:00:00 2001 +From 4e71f9001a3857f499001e072d41fcc5cc64ad84 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 26 Mar 2024 09:06:32 +0100 Subject: [PATCH 4/9] airgap @@ -12,7 +12,7 @@ Subject: [PATCH 4/9] airgap 5 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 5ef3132d2..1c9a709d4 100644 +index bf8a95ffe..b5c346754 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1172,6 +1172,24 @@ uint64_t WalletImpl::unlockedBalance(uint32_t accountIndex) const @@ -73,7 +73,7 @@ index fc6341861..7b885e866 100644 bool exportKeyImages(const std::string &filename, bool all = false) override; bool importKeyImages(const std::string &filename) override; diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h -index 626c63fc5..39b942ef4 100644 +index db5509227..5dcaeaaab 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -726,6 +726,7 @@ struct Wallet @@ -94,7 +94,7 @@ index 626c63fc5..39b942ef4 100644 * \brief exportKeyImages - exports key images to file * \param filename diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index d7e2a9699..f996863ff 100644 +index e013313b9..2a5f17a9f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -7432,6 +7432,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t * @@ -154,7 +154,7 @@ index d7e2a9699..f996863ff 100644 // if empty, put dummy entry so that the front can be referenced later in the loop if (unused_dust_indices_per_subaddr.empty()) diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h -index 2f2664f8e..51dbb5b89 100644 +index 009dce766..294a2d1f6 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1173,6 +1173,7 @@ private: diff --git a/patches/wownero/0005-coin-control.patch b/patches/wownero/0005-coin-control.patch index e2dbdb1..f473df6 100644 --- a/patches/wownero/0005-coin-control.patch +++ b/patches/wownero/0005-coin-control.patch @@ -1,4 +1,4 @@ -From 9f9937ef8f4822c498e10e5bbfc57dfdfb7137f7 Mon Sep 17 00:00:00 2001 +From f2484ecd2a8255fab9613cce346ee3c24f4a6ba6 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 27 Mar 2024 16:31:36 +0100 Subject: [PATCH 5/9] coin control @@ -118,7 +118,7 @@ index 3293d8ae9..bcd8b517f 100644 WalletImpl *m_wallet; std::vector m_rows; diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 1c9a709d4..b935723f7 100644 +index b5c346754..2dad8bc61 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2018,11 +2018,11 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector Date: Tue, 26 Mar 2024 09:44:54 +0100 Subject: [PATCH 6/9] fix build diff --git a/patches/wownero/0007-macos-build-fix.patch b/patches/wownero/0007-macos-build-fix.patch index 10c33d8..a92dd24 100644 --- a/patches/wownero/0007-macos-build-fix.patch +++ b/patches/wownero/0007-macos-build-fix.patch @@ -1,4 +1,4 @@ -From 0f3c19706a35798a28eb040858052292a3709312 Mon Sep 17 00:00:00 2001 +From 77b40bb52771655dcf5a9c926faf12738f8f0e55 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 28 Mar 2024 02:03:08 +0100 Subject: [PATCH 7/9] macos build fix diff --git a/patches/wownero/0008-FIX-wallet-listener-crashing.patch b/patches/wownero/0008-FIX-wallet-listener-crashing.patch index ae5c712..b9a2385 100644 --- a/patches/wownero/0008-FIX-wallet-listener-crashing.patch +++ b/patches/wownero/0008-FIX-wallet-listener-crashing.patch @@ -1,4 +1,4 @@ -From a2beff7fc49b80972f78dddedf0ea8c4db145f72 Mon Sep 17 00:00:00 2001 +From 370176c45e1037aa7c0413c07a59de3f220e0d93 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 2 Apr 2024 11:56:09 +0200 Subject: [PATCH 8/9] FIX: wallet listener crashing @@ -8,7 +8,7 @@ Subject: [PATCH 8/9] FIX: wallet listener crashing 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index b935723f7..432ca4fbf 100644 +index 2dad8bc61..bb66e2bfd 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -201,8 +201,11 @@ struct Wallet2CallbackImpl : public tools::i_wallet2_callback diff --git a/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch index e8809cd..c9cc888 100644 --- a/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch +++ b/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch @@ -1,4 +1,4 @@ -From 8cfcf5b132c41aedbc9c9a0932ffb832cf410761 Mon Sep 17 00:00:00 2001 +From d715a59a5760fa5b98ffb16678973ef5907462c3 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 2 Apr 2024 17:07:19 +0200 Subject: [PATCH 9/9] fix missing ___clear_cache when targetting iOS @@ -9,11 +9,11 @@ Subject: [PATCH 9/9] fix missing ___clear_cache when targetting iOS 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules -index 86009b6b6..f723bd2d8 100644 +index 1c469941e..fa54f48b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,6 +20,6 @@ - url = https://github.com/tevador/polyseed.git + branch = monero [submodule "external/randomwow"] path = external/randomwow - url = https://git.wownero.com/wownero/RandomWOW