summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--impls/monero.dart/lib/src/checksum_wownero.dart2
-rw-r--r--impls/monero.ts/checksum_wownero.ts2
-rw-r--r--patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch46
-rw-r--r--patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch10
-rw-r--r--patches/monero/0003-store-crash-fix.patch22
-rw-r--r--patches/monero/0004-Update-android-ndk.patch153
-rw-r--r--patches/monero/0004-uint64_t-missing-definition-fix.patch (renamed from patches/wownero/0006-uint64_t-missing-definition-fix.patch)6
-rw-r--r--patches/monero/0005-use-proper-error-handling-in-get_seed.patch (renamed from patches/wownero/0007-use-proper-error-handling-in-get_seed.patch)8
-rw-r--r--patches/monero/0006-UR-functions.patch (renamed from patches/wownero/0008-UR-functions.patch)94
-rw-r--r--patches/monero/0007-add-dummy-device-for-ledger.patch (renamed from patches/wownero/0009-add-dummy-device-for-ledger.patch)124
-rw-r--r--patches/monero/0008-polyseed.patch (renamed from patches/wownero/0010-polyseed.patch)360
-rw-r--r--patches/monero/0009-coin-control.patch (renamed from patches/wownero/0011-coin-control.patch)50
-rw-r--r--patches/monero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch (renamed from patches/wownero/0012-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch)10
-rw-r--r--patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch (renamed from patches/wownero/0013-Add-recoverDeterministicWalletFromSpendKey.patch)14
-rw-r--r--patches/monero/0012-add-monero-submodule-support.patch (renamed from patches/wownero/0015-add-monero-submodule-support.patch)14
-rw-r--r--patches/monero/0013-fix-iOS-depends-build.patch (renamed from patches/wownero/0017-iOS-depends-build.patch)18
-rw-r--r--patches/monero/0014-include-locale-only-when-targeting-WIN32.patch12
-rw-r--r--patches/monero/0015-ledger-dummy-fix.patch157
-rw-r--r--patches/monero/0020-catch-exception-in-queryWalletDevice.patch35
-rw-r--r--patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch4
-rw-r--r--patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch4
-rw-r--r--patches/wownero/0003-fix-is_trivially_copyable.patch4
-rw-r--r--patches/wownero/0004-store-crash-fix.patch4
-rw-r--r--patches/wownero/0005-Update-android-ndk.patch153
-rw-r--r--patches/wownero/0005-uint64_t-missing-definition-fix.patch (renamed from patches/monero/0005-uint64_t-missing-definition-fix.patch)6
-rw-r--r--patches/wownero/0006-use-proper-error-handling-in-get_seed.patch (renamed from patches/monero/0006-use-proper-error-handling-in-get_seed.patch)10
-rw-r--r--patches/wownero/0007-UR-functions.patch (renamed from patches/monero/0007-UR-functions.patch)59
-rw-r--r--patches/wownero/0008-add-dummy-device-for-ledger.patch (renamed from patches/monero/0008-add-dummy-device-for-ledger.patch)112
-rw-r--r--patches/wownero/0009-polyseed.patch (renamed from patches/monero/0009-polyseed.patch)101
-rw-r--r--patches/wownero/0010-coin-control.patch (renamed from patches/monero/0010-coin-control.patch)38
-rw-r--r--patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch (renamed from patches/monero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch)6
-rw-r--r--patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch (renamed from patches/monero/0012-Add-recoverDeterministicWalletFromSpendKey.patch)10
-rw-r--r--patches/wownero/0013-add-monero-submodule-support.patch (renamed from patches/monero/0013-add-monero-submodule-support.patch)14
-rw-r--r--patches/wownero/0014-build-wownero-seed.patch614
-rw-r--r--patches/wownero/0014-fix-iOS-depends-build.patch (renamed from patches/monero/0014-fix-iOS-depends-build.patch)18
-rw-r--r--patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch (renamed from patches/wownero/0016-include-locale-only-when-targeting-WIN32.patch)12
-rw-r--r--patches/wownero/0017-ledger-dummy-fix.patch157
-rw-r--r--wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h2
38 files changed, 515 insertions, 1950 deletions
diff --git a/impls/monero.dart/lib/src/checksum_wownero.dart b/impls/monero.dart/lib/src/checksum_wownero.dart
index abc1038..b0d7bc3 100644
--- a/impls/monero.dart/lib/src/checksum_wownero.dart
+++ b/impls/monero.dart/lib/src/checksum_wownero.dart
@@ -1,4 +1,4 @@
// ignore_for_file: constant_identifier_names
const String wallet2_api_c_h_sha256 = "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77";
-const String wallet2_api_c_cpp_sha256 = "07d67f34a07869aaa4af6ca04e142dbad2fb1fba0e2ebdefd22bc333fd982e25-dd46a31f3cab67b316e9239b15acf7d5cea60aa9";
+const String wallet2_api_c_cpp_sha256 = "80ec887a70b5198968a402cba0aca65880b55277ea6b1af718efa3951814a6cf-dd46a31f3cab67b316e9239b15acf7d5cea60aa9";
const String wallet2_api_c_exp_sha256 = "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4";
diff --git a/impls/monero.ts/checksum_wownero.ts b/impls/monero.ts/checksum_wownero.ts
index 208d455..8623ef9 100644
--- a/impls/monero.ts/checksum_wownero.ts
+++ b/impls/monero.ts/checksum_wownero.ts
@@ -1,5 +1,5 @@
export const wowneroChecksum = {
wallet2_api_c_h_sha256: "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77",
- wallet2_api_c_cpp_sha256: "07d67f34a07869aaa4af6ca04e142dbad2fb1fba0e2ebdefd22bc333fd982e25-dd46a31f3cab67b316e9239b15acf7d5cea60aa9",
+ wallet2_api_c_cpp_sha256: "80ec887a70b5198968a402cba0aca65880b55277ea6b1af718efa3951814a6cf-dd46a31f3cab67b316e9239b15acf7d5cea60aa9",
wallet2_api_c_exp_sha256: "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4",
}
diff --git a/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch b/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch
index 302e5ac..849c8be 100644
--- a/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch
+++ b/patches/monero/0001-wallet-background-sync-with-just-the-view-key.patch
@@ -1,7 +1,7 @@
-From 66e6b4d40e9d7a927b0697bb66d387d18ad9ef0a Mon Sep 17 00:00:00 2001
+From 0efd53a750d0827a500b036dc30ab190689e7e13 Mon Sep 17 00:00:00 2001
From: j-berman <justinberman@protonmail.com>
Date: Thu, 13 Oct 2022 18:33:33 -0700
-Subject: [PATCH 01/12] wallet: background sync with just the view key
+Subject: [PATCH 01/14] wallet: background sync with just the view key
- When background syncing, the wallet wipes the spend key
from memory and processes all new transactions. The wallet saves
@@ -50,7 +50,7 @@ cache.
20 files changed, 2337 insertions(+), 130 deletions(-)
diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
-index 2ac455fda..4e87d4477 100644
+index 2ac455f..4e87d44 100644
--- a/src/cryptonote_basic/account.cpp
+++ b/src/cryptonote_basic/account.cpp
@@ -152,6 +152,17 @@ DISABLE_VS_WARNINGS(4244 4345)
@@ -72,7 +72,7 @@ index 2ac455fda..4e87d4477 100644
{
crypto::secret_key first = generate_keys(m_keys.m_account_address.m_spend_public_key, m_keys.m_spend_secret_key, recovery_key, recover);
diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h
-index 2ee9545d4..93d1d28f0 100644
+index 2ee9545..93d1d28 100644
--- a/src/cryptonote_basic/account.h
+++ b/src/cryptonote_basic/account.h
@@ -95,6 +95,7 @@ namespace cryptonote
@@ -84,7 +84,7 @@ index 2ee9545d4..93d1d28f0 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 61146a114..f9e6a6cb9 100644
+index 61146a1..f9e6a6c 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
@@ -241,6 +241,8 @@ namespace config
@@ -97,7 +97,7 @@ index 61146a114..f9e6a6cb9 100644
const unsigned char HASH_KEY_MEMORY = 'k';
const unsigned char HASH_KEY_MULTISIG[] = {'M', 'u', 'l', 't' , 'i', 's', 'i', 'g', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index b9e30f9d9..2c51337ef 100644
+index b9e30f9..2c51337 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -155,6 +155,17 @@ typedef cryptonote::simple_wallet sw;
@@ -721,7 +721,7 @@ index b9e30f9d9..2c51337ef 100644
{
PRINT_USAGE(USAGE_IMPORT_OUTPUTS);
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
-index 652708f5a..159da2c45 100644
+index 652708f..159da2c 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -147,6 +147,7 @@ namespace cryptonote
@@ -733,7 +733,7 @@ index 652708f5a..159da2c45 100644
bool set_inactivity_lock_timeout(const std::vector<std::string> &args = std::vector<std::string>());
bool set_setup_background_mining(const std::vector<std::string> &args = std::vector<std::string>());
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index fc4f89128..e9f76f4cf 100644
+index fc4f891..e9f76f4 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -54,6 +54,40 @@ using namespace cryptonote;
@@ -1198,7 +1198,7 @@ index fc4f89128..e9f76f4cf 100644
setStatusError(tr("Rescan spent can only be used with a trusted daemon"));
return false;
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index ec2d7e9b3..1f199a72c 100644
+index ec2d7e9..1f199a7 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -171,6 +171,13 @@ public:
@@ -1235,7 +1235,7 @@ index ec2d7e9b3..1f199a72c 100644
std::unique_ptr<TransactionHistoryImpl> m_history;
std::unique_ptr<Wallet2CallbackImpl> m_wallet2Callback;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 71991df0d..e349df176 100644
+index 71991df..e349df1 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -445,6 +445,12 @@ struct Wallet
@@ -1295,7 +1295,7 @@ index 71991df0d..e349df176 100644
virtual AddressBook * addressBook() = 0;
virtual Subaddress * subaddress() = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index ad8c36190..8146014d6 100644
+index ad8c361..8146014 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -157,6 +157,8 @@ static const std::string MULTISIG_SIGNATURE_MAGIC = "SigMultisigPkV1";
@@ -2739,7 +2739,7 @@ index ad8c36190..8146014d6 100644
{
payment_container payments;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 24366f630..b1dc4f716 100644
+index 24366f6..b1dc4f7 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -256,6 +256,20 @@ private:
@@ -3049,7 +3049,7 @@ index 24366f630..b1dc4f716 100644
}
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h
-index c077313d4..c54cd3499 100644
+index c077313..c54cd34 100644
--- a/src/wallet/wallet_errors.h
+++ b/src/wallet/wallet_errors.h
@@ -63,6 +63,7 @@ namespace tools
@@ -3120,7 +3120,7 @@ index c077313d4..c54cd3499 100644
#if !defined(_MSC_VER)
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index b1419949f..d24b4c563 100644
+index b141994..d24b4c5 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -73,6 +73,54 @@ using namespace epee;
@@ -3566,7 +3566,7 @@ index b1419949f..d24b4c563 100644
try
{
diff --git a/src/wallet/wallet_rpc_server.h b/src/wallet/wallet_rpc_server.h
-index 3308d1751..c2329aafe 100644
+index 3308d17..c2329aa 100644
--- a/src/wallet/wallet_rpc_server.h
+++ b/src/wallet/wallet_rpc_server.h
@@ -160,6 +160,9 @@ namespace tools
@@ -3590,7 +3590,7 @@ index 3308d1751..c2329aafe 100644
//json rpc v2
bool on_query_key(const wallet_rpc::COMMAND_RPC_QUERY_KEY::request& req, wallet_rpc::COMMAND_RPC_QUERY_KEY::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
-index b6098d95c..a44b56ed6 100644
+index b6098d9..a44b56e 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -2696,5 +2696,69 @@ namespace wallet_rpc
@@ -3664,7 +3664,7 @@ index b6098d95c..a44b56ed6 100644
}
}
diff --git a/src/wallet/wallet_rpc_server_error_codes.h b/src/wallet/wallet_rpc_server_error_codes.h
-index 541d29f86..4756c191c 100644
+index 541d29f..4756c19 100644
--- a/src/wallet/wallet_rpc_server_error_codes.h
+++ b/src/wallet/wallet_rpc_server_error_codes.h
@@ -81,3 +81,5 @@
@@ -3674,7 +3674,7 @@ index 541d29f86..4756c191c 100644
+#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_WALLET -51
+#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_SYNCING -52
diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py
-index 4063911f4..60eb09a10 100755
+index 4063911..60eb09a 100755
--- a/tests/functional_tests/transfer.py
+++ b/tests/functional_tests/transfer.py
@@ -30,6 +30,7 @@
@@ -4112,7 +4112,7 @@ index 4063911f4..60eb09a10 100755
if __name__ == '__main__':
TransferTest().run_test()
diff --git a/tests/functional_tests/util_resources.py b/tests/functional_tests/util_resources.py
-index e030312da..3ca6fdb86 100755
+index e030312..3ca6fdb 100755
--- a/tests/functional_tests/util_resources.py
+++ b/tests/functional_tests/util_resources.py
@@ -37,6 +37,8 @@
@@ -4152,7 +4152,7 @@ index e030312da..3ca6fdb86 100755
+ assert WALLET_DIRECTORY != ''
+ return os.path.isfile(WALLET_DIRECTORY + '/' + name)
diff --git a/tests/functional_tests/wallet.py b/tests/functional_tests/wallet.py
-index 1ad05c98f..8182cecb2 100755
+index 1ad05c9..8182cec 100755
--- a/tests/functional_tests/wallet.py
+++ b/tests/functional_tests/wallet.py
@@ -34,8 +34,7 @@
@@ -4243,7 +4243,7 @@ index 1ad05c98f..8182cecb2 100755
if __name__ == '__main__':
diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp
-index ef6964f9e..25121a02e 100644
+index ef6964f..25121a0 100644
--- a/tests/unit_tests/wipeable_string.cpp
+++ b/tests/unit_tests/wipeable_string.cpp
@@ -211,3 +211,15 @@ TEST(wipeable_string, to_hex)
@@ -4263,7 +4263,7 @@ index ef6964f9e..25121a02e 100644
+ ASSERT_TRUE(str == std::string("foo"));
+}
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
-index 1e10e1f86..bff33a561 100644
+index 1e10e1f..bff33a5 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -1138,3 +1138,45 @@ class Wallet(object):
@@ -4313,5 +4313,5 @@ index 1e10e1f86..bff33a561 100644
+ }
+ return self.rpc.send_json_rpc_request(stop_background_sync)
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
index 7d2fe5b..2b13c05 100644
--- a/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
+++ b/patches/monero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
@@ -1,7 +1,7 @@
-From aee5abfcc82ca7ff3e350fd964bbcb6406a91201 Mon Sep 17 00:00:00 2001
+From c7b6e26d36d2428e5747e2b8287ae3719fa443e3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Tue, 2 Apr 2024 16:51:56 +0200
-Subject: [PATCH 02/12] fix missing ___clear_cache when targetting iOS
+Subject: [PATCH 02/14] fix missing ___clear_cache when targetting iOS
---
.gitmodules | 3 ++-
@@ -9,7 +9,7 @@ Subject: [PATCH 02/12] fix missing ___clear_cache when targetting iOS
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitmodules b/.gitmodules
-index 721cce3b4..ffb73fe9a 100644
+index 721cce3..ffb73fe 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -9,7 +9,8 @@
@@ -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 102f8ac..ce72c9b 160000
--- a/external/randomx
+++ b/external/randomx
@@ -1 +1 @@
-Subproject commit 102f8acf90a7649ada410de5499a7ec62e49e1da
+Subproject commit ce72c9bb9cb799e0d9171094b9abb009e04c5bfc
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0003-store-crash-fix.patch b/patches/monero/0003-store-crash-fix.patch
index a0a07df..225f0ab 100644
--- a/patches/monero/0003-store-crash-fix.patch
+++ b/patches/monero/0003-store-crash-fix.patch
@@ -1,7 +1,7 @@
-From 92b9dcfa4cc36728fc8d5738ab8bb71931a3e30d Mon Sep 17 00:00:00 2001
+From b49bc52f3d3d1751dd65d4694e4f74b84b23f583 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Sat, 11 May 2024 16:25:10 +0200
-Subject: [PATCH 03/12] store crash fix
+Subject: [PATCH 03/14] store crash fix
Monero wallet crashes (sometimes) when it is syncing,
while the proper solution (that can be seen in feather)
@@ -38,12 +38,12 @@ the current state.
---
src/wallet/api/wallet.cpp | 25 ++++++++++++-------------
src/wallet/api/wallet.h | 1 -
- src/wallet/wallet2.cpp | 12 +++++++++++-
+ src/wallet/wallet2.cpp | 11 ++++++++++-
src/wallet/wallet2.h | 3 +++
- 4 files changed, 26 insertions(+), 15 deletions(-)
+ 4 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e9f76f4cf..0d85cf359 100644
+index e9f76f4..0d85cf3 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -55,8 +55,8 @@ using namespace cryptonote;
@@ -135,7 +135,7 @@ index e9f76f4cf..0d85cf359 100644
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index 1f199a72c..ac7ce2f6a 100644
+index 1f199a7..ac7ce2f 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -273,7 +273,6 @@ private:
@@ -147,7 +147,7 @@ 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 8146014d6..aa61fb298 100644
+index 8146014..7913d55 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
@@ -173,19 +173,17 @@ index 8146014d6..aa61fb298 100644
bool wallet2::set_proxy(const std::string &address)
{
return m_http_client->set_proxy(address);
-@@ -4096,8 +4105,9 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
+@@ -4096,7 +4105,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;
- while(m_run.load(std::memory_order_relaxed) && blocks_fetched < max_blocks)
+ while(m_run.load(std::memory_order_relaxed) && blocks_fetched < max_blocks && m_refreshEnabled)
{
-+ LOG_ERROR("SYNCING");
uint64_t next_blocks_start_height;
std::vector<cryptonote::block_complete_entry> next_blocks;
- std::vector<parsed_block> next_parsed_blocks;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index b1dc4f716..a050286bc 100644
+index b1dc4f7..a050286 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1071,6 +1071,8 @@ private:
@@ -206,5 +204,5 @@ index b1dc4f716..a050286bc 100644
i_wallet2_callback* m_callback;
hw::device::device_type m_key_device_type;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0004-Update-android-ndk.patch b/patches/monero/0004-Update-android-ndk.patch
deleted file mode 100644
index a85c240..0000000
--- a/patches/monero/0004-Update-android-ndk.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 0893e2ca97d65bf64abd3efda3554f66948e073d Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Thu, 23 May 2024 08:02:49 +0200
-Subject: [PATCH 04/12] Update android ndk
-
-rename arm -> armv7a
----
- contrib/depends/hosts/android.mk | 18 ++++++++++++----
- contrib/depends/packages/android_ndk.mk | 28 ++++++++++++++++++-------
- contrib/depends/packages/boost.mk | 1 +
- contrib/depends/packages/openssl.mk | 2 +-
- contrib/depends/toolchain.cmake.in | 13 ++++++------
- 5 files changed, 44 insertions(+), 18 deletions(-)
-
-diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk
-index d6f8b99dd..827103c36 100644
---- a/contrib/depends/hosts/android.mk
-+++ b/contrib/depends/hosts/android.mk
-@@ -1,12 +1,22 @@
- ANDROID_API=21
--
--ifeq ($(host_arch),arm)
--host_toolchain=arm-linux-androideabi-
-+host_toolchain=nonexistent
-+ifeq ($(host_arch),armv7a)
-+host_toolchain=armv7a-linux-androideabi${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),x86_64)
-+host_toolchain=x86_64-linux-android${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),i686)
-+host_toolchain=i686-linux-android${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),aarch64)
-+host_toolchain=aarch64-linux-android${ANDROID_API}-
- endif
-
- android_CC=$(host_toolchain)clang
- android_CXX=$(host_toolchain)clang++
--android_RANLIB=:
-+android_RANLIB=llvm-ranlib
-+android_AR=llvm-ar
-
- android_CFLAGS=-pipe
- android_CXXFLAGS=$(android_CFLAGS)
-diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk
-index 9b8a5332f..2c2914ec2 100644
---- a/contrib/depends/packages/android_ndk.mk
-+++ b/contrib/depends/packages/android_ndk.mk
-@@ -1,12 +1,16 @@
- package=android_ndk
--$(package)_version=17b
-+$(package)_version=26d
- $(package)_download_path=https://dl.google.com/android/repository/
--$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
--$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
-+$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip
-+$(package)_sha256_hash=eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54
-+
-+$(package)_version_apiversion=21
-
- define $(package)_set_vars
--$(package)_config_opts_arm=--arch arm
-+$(package)_config_opts_armv7a=--arch arm
- $(package)_config_opts_aarch64=--arch arm64
-+$(package)_config_opts_x86_64=--arch x86_64
-+$(package)_config_opts_i686=--arch x86
- endef
-
- define $(package)_extract_cmds
-@@ -14,9 +18,19 @@ define $(package)_extract_cmds
- unzip -q $($(1)_source_dir)/$($(package)_file_name)
- endef
-
-+# arm-linux-androideabi-ar - openssl workaround
-+
- define $(package)_stage_cmds
-- android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
-- --install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
-- mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
-+ mkdir -p $(build_prefix) &&\
-+ echo $(build_prefix)/toolchain && \
-+ android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api $($(package)_version_apiversion) \
-+ --install-dir $(build_prefix)/toolchain --stl=libc++ $($(package)_config_opts) &&\
-+ mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native && \
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ranlib &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ranlib &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ranlib
- endef
-
-diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
-index fd06c5393..c17e863cc 100644
---- a/contrib/depends/packages/boost.mk
-+++ b/contrib/depends/packages/boost.mk
-@@ -25,6 +25,7 @@ $(package)_archiver_darwin=$($(package)_libtool)
- $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
- $(package)_cxxflags=-std=c++11
- $(package)_cxxflags_linux=-fPIC
-+$(package)_cxxflags_android=-fPIC
- $(package)_cxxflags_freebsd=-fPIC
- endef
-
-diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk
-index a157762c7..2430f6495 100644
---- a/contrib/depends/packages/openssl.mk
-+++ b/contrib/depends/packages/openssl.mk
-@@ -34,7 +34,7 @@ $(package)_config_opts_x86_64_linux=linux-x86_64
- $(package)_config_opts_i686_linux=linux-generic32
- $(package)_config_opts_arm_linux=linux-generic32
- $(package)_config_opts_aarch64_linux=linux-generic64
--$(package)_config_opts_arm_android=--static android-arm
-+$(package)_config_opts_armv7a_android=--static android-arm
- $(package)_config_opts_aarch64_android=--static android-arm64
- $(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
- $(package)_config_opts_riscv64_linux=linux-generic64
-diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
-index f118c754e..cc1d9b5c5 100644
---- a/contrib/depends/toolchain.cmake.in
-+++ b/contrib/depends/toolchain.cmake.in
-@@ -100,20 +100,21 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- SET(LLVM_ENABLE_PIE OFF)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
- SET(ANDROID TRUE)
-- if(ARCHITECTURE STREQUAL "arm")
-+ if(ARCHITECTURE STREQUAL "armv7a")
- SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
- SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
- SET(CMAKE_ANDROID_ARM_MODE ON)
-- SET(CMAKE_C_COMPILER_TARGET arm-linux-androideabi)
-- SET(CMAKE_CXX_COMPILER_TARGET arm-linux-androideabi)
-- SET(_CMAKE_TOOLCHAIN_PREFIX arm-linux-androideabi-)
-+ SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21)
-+ SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21)
-+ SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-)
- elseif(ARCHITECTURE STREQUAL "aarch64")
- SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
- SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
- endif()
- SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native)
-- SET(CMAKE_C_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang")
-- SET(CMAKE_CXX_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang++")
-+ SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
-+ SET(CMAKE_C_COMPILER @CC@)
-+ SET(CMAKE_CXX_COMPILER @CXX@)
- else()
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_CXX_COMPILER @CXX@)
---
-2.43.0
-
diff --git a/patches/wownero/0006-uint64_t-missing-definition-fix.patch b/patches/monero/0004-uint64_t-missing-definition-fix.patch
index 8ee8e0b..129886b 100644
--- a/patches/wownero/0006-uint64_t-missing-definition-fix.patch
+++ b/patches/monero/0004-uint64_t-missing-definition-fix.patch
@@ -1,14 +1,14 @@
-From aca7cc3b8a3c2c19d46c07b2f0b5b9d6d23cbde6 Mon Sep 17 00:00:00 2001
+From 99e6af859234d8b37866e46d95d77e20687767de Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 2 Sep 2024 16:40:31 +0200
-Subject: [PATCH 06/17] uint64_t missing definition fix
+Subject: [PATCH 04/14] 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 4af4da7..ae4c0d0 100644
--- a/contrib/epee/include/net/http_base.h
+++ b/contrib/epee/include/net/http_base.h
@@ -28,7 +28,7 @@
diff --git a/patches/wownero/0007-use-proper-error-handling-in-get_seed.patch b/patches/monero/0005-use-proper-error-handling-in-get_seed.patch
index 1781efb..3562b7b 100644
--- a/patches/wownero/0007-use-proper-error-handling-in-get_seed.patch
+++ b/patches/monero/0005-use-proper-error-handling-in-get_seed.patch
@@ -1,7 +1,7 @@
-From 8539d33a80d584afddf4aed7cd653afbb1d578e0 Mon Sep 17 00:00:00 2001
+From 6be87b2c75ea663e205f468c986809755839afa3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 24 Jun 2024 10:49:12 +0200
-Subject: [PATCH 07/17] use proper error handling in get_seed
+Subject: [PATCH 05/14] use proper error handling in get_seed
---
src/wallet/api/wallet.cpp | 17 ++++++++++++-----
@@ -9,7 +9,7 @@ Subject: [PATCH 07/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 899ef044a..e16d8f83f 100644
+index 0d85cf3..dfbf4fd 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -826,12 +826,19 @@ bool WalletImpl::close(bool store)
@@ -38,7 +38,7 @@ index 899ef044a..e16d8f83f 100644
std::string WalletImpl::getSeedLanguage() const
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 651161d14..1e527cf97 100644
+index 7913d55..debc0c2 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1440,11 +1440,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
diff --git a/patches/wownero/0008-UR-functions.patch b/patches/monero/0006-UR-functions.patch
index e6991ae..c25b2d0 100644
--- a/patches/wownero/0008-UR-functions.patch
+++ b/patches/monero/0006-UR-functions.patch
@@ -1,7 +1,7 @@
-From 0fe44ec3cb8f4b210e2c7a8a6191abfe89d250a9 Mon Sep 17 00:00:00 2001
+From 3138500cb65a6d72726d611d16cbd4b28d01fbe9 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 10:09:50 +0100
-Subject: [PATCH 08/17] UR functions
+Subject: [PATCH 06/14] UR functions
This commit adds UR functions for UR tasks,
I believe that the right place to get
@@ -19,10 +19,8 @@ Things broken in the commit
later. However (considering the purpose
of this patch) it is not a dealbreaker.
---
- .gitmodules | 5 +-
+ .gitmodules | 4 +
CMakeLists.txt | 4 +-
- contrib/depends/hosts/darwin.mk | 2 +-
- contrib/depends/toolchain.cmake.in | 2 +-
external/CMakeLists.txt | 1 +
external/bc-ur | 1 +
src/device/device_ledger.cpp | 5 +-
@@ -36,24 +34,23 @@ Things broken in the commit
src/wallet/api/wallet2_api.h | 22 +-
src/wallet/wallet2.cpp | 141 +++++++----
src/wallet/wallet2.h | 3 +
- 17 files changed, 521 insertions(+), 60 deletions(-)
+ 15 files changed, 519 insertions(+), 57 deletions(-)
create mode 160000 external/bc-ur
diff --git a/.gitmodules b/.gitmodules
-index 991071fbe..b24855d9b 100644
+index ffb73fe..72af74d 100644
--- a/.gitmodules
+++ b/.gitmodules
-@@ -16,4 +16,7 @@
- path = external/randomwow
- url = https://codeberg.org/wownero/RandomWOW
- branch = 1.2.1-wow
--
+@@ -15,3 +15,7 @@
+ path = external/supercop
+ url = https://github.com/monero-project/supercop
+ branch = monero
+[submodule "external/bc-ur"]
+ path = external/bc-ur
+ url = https://github.com/MrCyjaneK/bc-ur
+ branch = misc
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e387ffb1b..8b81c7ab7 100644
+index 8fb03ba..63ee825 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,8 @@ enable_language(C ASM)
@@ -66,56 +63,33 @@ index e387ffb1b..8b81c7ab7 100644
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
-@@ -365,6 +366,7 @@ if(NOT MANUAL_SUBMODULES)
+@@ -364,6 +365,7 @@ if(NOT MANUAL_SUBMODULES)
endfunction ()
message(STATUS "Checking submodules")
-+ #check_submodule(external/bc-ur)
++# check_submodule(external/bc-ur)
check_submodule(external/miniupnp)
check_submodule(external/rapidjson)
- #check_submodule(external/trezor-common)
-diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
-index 79d449054..83d83036b 100644
---- a/contrib/depends/hosts/darwin.mk
-+++ b/contrib/depends/hosts/darwin.mk
-@@ -1,4 +1,4 @@
--OSX_MIN_VERSION=10.8
-+OSX_MIN_VERSION=10.14
- LD64_VERSION=609
- ifeq (aarch64, $(host_arch))
- CC_target=arm64-apple-$(host_os)
-diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
-index cc1d9b5c5..48a6f947e 100644
---- a/contrib/depends/toolchain.cmake.in
-+++ b/contrib/depends/toolchain.cmake.in
-@@ -94,7 +94,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- SET(BREW OFF)
- SET(PORT OFF)
- SET(CMAKE_OSX_SYSROOT "@prefix@/native/SDK/")
-- SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.08")
-+ SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
- SET(CMAKE_CXX_STANDARD 14)
- SET(LLVM_ENABLE_PIC OFF)
- SET(LLVM_ENABLE_PIE OFF)
+ check_submodule(external/trezor-common)
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index 3184ae5a1..88a7bb0b5 100644
+index 5b7f69a..f9ed6a6 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
-@@ -72,4 +72,5 @@ endif()
+@@ -69,4 +69,5 @@ endif()
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
+add_subdirectory(bc-ur)
- add_subdirectory(randomwow EXCLUDE_FROM_ALL)
+ add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/external/bc-ur b/external/bc-ur
new file mode 160000
-index 000000000..d82e7c753
+index 0000000..d82e7c7
--- /dev/null
+++ b/external/bc-ur
@@ -0,0 +1 @@
+Subproject commit d82e7c753e710b8000706dc3383b498438795208
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index 9961d13e7..8403d76e8 100644
+index 5d0afe1..bb5b6f4 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -313,12 +313,13 @@ namespace hw {
@@ -135,7 +109,7 @@ index 9961d13e7..8403d76e8 100644
boost::lock_guard<boost::recursive_mutex> lock1(device_locker, boost::adopt_lock); \
boost::lock_guard<boost::mutex> lock2(command_locker, boost::adopt_lock)
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
-index fdf3f2f5d..66384fe31 100644
+index 6095f99..b163212 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -50,6 +50,7 @@ monero_add_library(wallet
@@ -147,7 +121,7 @@ index fdf3f2f5d..66384fe31 100644
common
cryptonote_core
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp
-index 70a702796..9c3c26ee5 100644
+index 70a7027..9c3c26e 100644
--- a/src/wallet/api/pending_transaction.cpp
+++ b/src/wallet/api/pending_transaction.cpp
@@ -42,6 +42,8 @@
@@ -198,7 +172,7 @@ index 70a702796..9c3c26ee5 100644
{
uint64_t result = 0;
diff --git a/src/wallet/api/pending_transaction.h b/src/wallet/api/pending_transaction.h
-index 0a9779c07..403bfe281 100644
+index 0a9779c..403bfe2 100644
--- a/src/wallet/api/pending_transaction.h
+++ b/src/wallet/api/pending_transaction.h
@@ -46,6 +46,7 @@ public:
@@ -210,7 +184,7 @@ index 0a9779c07..403bfe281 100644
uint64_t dust() const override;
uint64_t fee() const override;
diff --git a/src/wallet/api/unsigned_transaction.cpp b/src/wallet/api/unsigned_transaction.cpp
-index 6165a2240..fd03e959d 100644
+index 6165a22..fd03e95 100644
--- a/src/wallet/api/unsigned_transaction.cpp
+++ b/src/wallet/api/unsigned_transaction.cpp
@@ -40,6 +40,8 @@
@@ -270,7 +244,7 @@ index 6165a2240..fd03e959d 100644
bool UnsignedTransactionImpl::checkLoadedTx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message)
{
diff --git a/src/wallet/api/unsigned_transaction.h b/src/wallet/api/unsigned_transaction.h
-index 30065a7fa..a94b23f75 100644
+index 30065a7..a94b23f 100644
--- a/src/wallet/api/unsigned_transaction.h
+++ b/src/wallet/api/unsigned_transaction.h
@@ -53,6 +53,7 @@ public:
@@ -282,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 e16d8f83f..ee000e7ab 100644
+index dfbf4fd..4fb5f75 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -47,6 +47,7 @@
@@ -658,7 +632,7 @@ index e16d8f83f..ee000e7ab 100644
{
if (checkBackgroundSync("cannot scan transactions"))
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index ac7ce2f6a..edf8bb8ce 100644
+index ac7ce2f..edf8bb8 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -112,6 +112,7 @@ public:
@@ -689,7 +663,7 @@ index ac7ce2f6a..edf8bb8ce 100644
bool setupBackgroundSync(const BackgroundSyncType background_sync_type, const std::string &wallet_password, const optional<std::string> &background_cache_password = optional<std::string>()) override;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index e349df176..764adbfbf 100644
+index e349df1..764adbf 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -91,6 +91,7 @@ struct PendingTransaction
@@ -780,7 +754,7 @@ 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 1e527cf97..671fa5298 100644
+index debc0c2..dfa3213 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)
@@ -800,7 +774,7 @@ index 1e527cf97..671fa5298 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);
-@@ -6989,6 +6999,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
+@@ -6986,6 +6996,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
return amount;
}
//----------------------------------------------------------------------------------------------------
@@ -826,7 +800,7 @@ index 1e527cf97..671fa5298 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;
-@@ -7840,9 +7869,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
+@@ -7837,9 +7866,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;
@@ -837,7 +811,7 @@ index 1e527cf97..671fa5298 100644
std::vector<crypto::public_key> additional_tx_pub_keys;
for (const crypto::secret_key &skey: txs[n].additional_tx_keys)
{
-@@ -11232,7 +11259,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11235,7 +11262,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;
}
@@ -846,7 +820,7 @@ index 1e527cf97..671fa5298 100644
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
{
-@@ -11282,9 +11309,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11285,9 +11312,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");
@@ -864,7 +838,7 @@ index 1e527cf97..671fa5298 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({});
-@@ -13911,33 +13944,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
+@@ -13923,33 +13956,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
{
@@ -928,7 +902,7 @@ index 1e527cf97..671fa5298 100644
//----------------------------------------------------------------------------------------------------
std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> wallet2::export_key_images(bool all) const
{
-@@ -13992,53 +14032,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
+@@ -14004,53 +14044,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
return std::make_pair(offset, ski);
}
@@ -1008,7 +982,7 @@ index 1e527cf97..671fa5298 100644
ski.push_back(std::make_pair(key_image, signature));
}
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index c07a47c11..80ff0698d 100644
+index a050286..1d7e430 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1150,6 +1150,7 @@ private:
diff --git a/patches/wownero/0009-add-dummy-device-for-ledger.patch b/patches/monero/0007-add-dummy-device-for-ledger.patch
index acd7b0c..b9e1bea 100644
--- a/patches/wownero/0009-add-dummy-device-for-ledger.patch
+++ b/patches/monero/0007-add-dummy-device-for-ledger.patch
@@ -1,29 +1,30 @@
-From 08301e22d38bf69b35cda50111f95af120f98a3f Mon Sep 17 00:00:00 2001
+From bf8c0d01e60dade9fbdd77c4ce825e6b37d3c6c3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 26 Jun 2024 15:04:38 +0200
-Subject: [PATCH 09/17] add dummy device for ledger
+Subject: [PATCH 07/14] add dummy device for ledger
---
- CMakeLists.txt | 6 +-
- src/device/CMakeLists.txt | 6 +-
- src/device/device.cpp | 10 ++-
- src/device/device.hpp | 12 +--
- src/device/device_io_dummy.cpp | 133 +++++++++++++++++++++++++++++++++
- src/device/device_io_dummy.hpp | 74 ++++++++++++++++++
- src/device/device_ledger.cpp | 6 +-
- src/device/device_ledger.hpp | 7 +-
- src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++++
- src/wallet/api/wallet.h | 18 +++++
- src/wallet/api/wallet2_api.h | 12 +++
- 11 files changed, 357 insertions(+), 21 deletions(-)
+ CMakeLists.txt | 6 +-
+ src/device/CMakeLists.txt | 6 +-
+ src/device/device.cpp | 10 ++-
+ src/device/device.hpp | 12 +--
+ src/device/device_io_dummy.cpp | 133 ++++++++++++++++++++++++++++++
+ src/device/device_io_dummy.hpp | 74 +++++++++++++++++
+ src/device/device_ledger.cpp | 6 +-
+ src/device/device_ledger.hpp | 7 +-
+ src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++
+ src/wallet/api/wallet.h | 18 ++++
+ src/wallet/api/wallet2_api.h | 12 +++
+ src/wallet/api/wallet_manager.cpp | 12 ++-
+ 12 files changed, 365 insertions(+), 25 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 8b81c7ab7..abe44eca5 100644
+index 63ee825..43ef6cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -709,8 +709,12 @@ include_directories(${LMDB_INCLUDE})
+@@ -692,8 +692,12 @@ include_directories(${LMDB_INCLUDE})
include_directories(${LIBUNWIND_INCLUDE})
link_directories(${LIBUNWIND_LIBRARY_DIRS})
@@ -38,7 +39,7 @@ index 8b81c7ab7..abe44eca5 100644
add_definitions(-DHAVE_HIDAPI)
include_directories(${HIDAPI_INCLUDE_DIR})
diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
-index e4f1159b5..14d398f87 100644
+index e4f1159..14d398f 100644
--- a/src/device/CMakeLists.txt
+++ b/src/device/CMakeLists.txt
@@ -29,10 +29,11 @@
@@ -68,7 +69,7 @@ index e4f1159b5..14d398f87 100644
${device_headers}
device_ledger.hpp
diff --git a/src/device/device.cpp b/src/device/device.cpp
-index e6cd358b6..636929feb 100644
+index e6cd358..777584c 100644
--- a/src/device/device.cpp
+++ b/src/device/device.cpp
@@ -29,7 +29,7 @@
@@ -106,7 +107,7 @@ index e6cd358b6..636929feb 100644
return *device->second;
}
diff --git a/src/device/device.hpp b/src/device/device.hpp
-index 392703a24..ffd419779 100644
+index 392703a..ffd4197 100644
--- a/src/device/device.hpp
+++ b/src/device/device.hpp
@@ -34,17 +34,7 @@
@@ -130,7 +131,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..fb082694e
+index 0000000..edb4bee
--- /dev/null
+++ b/src/device/device_io_dummy.cpp
@@ -0,0 +1,133 @@
@@ -174,7 +175,7 @@ index 000000000..fb082694e
+// Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
+// own USB/BLE/other transport layer.
+
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include <boost/scope_exit.hpp>
+#include "log.hpp"
+#include "device_io_dummy.hpp"
@@ -234,13 +235,13 @@ index 000000000..fb082694e
+ MDEBUG("exchange(): waitsForDeviceSend");
+ // NOTE: waitsForDeviceSend should be changed by external code
+ while (waitsForDeviceSend) {
-+ sleep(1);
++ usleep(1000);
+ MDEBUG("exchange(): waitsForDeviceSend (still)");
+ }
+
+ MDEBUG("exchange(): waitsForDeviceReceive");
+ while (waitsForDeviceReceive) {
-+ sleep(1);
++ usleep(1000);
+ MDEBUG("exchange(): waitsForDeviceReceive (still)");
+ }
+
@@ -270,7 +271,7 @@ index 000000000..fb082694e
\ 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..a1733616d
+index 0000000..a173361
--- /dev/null
+++ b/src/device/device_io_dummy.hpp
@@ -0,0 +1,74 @@
@@ -349,7 +350,7 @@ index 000000000..a1733616d
+
+#endif // HAVE_HIDAPI
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index 8403d76e8..db40a2eb7 100644
+index bb5b6f4..046201a 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -41,7 +41,7 @@ namespace hw {
@@ -374,14 +375,14 @@ index 8403d76e8..db40a2eb7 100644
bool device_ledger::connect(void) {
this->disconnect();
-+ #ifndef HIDAPI_DUMMY
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
hw_device.connect(known_devices);
+ #endif
this->reset();
#ifdef DEBUG_HWDEVICE
cryptonote::account_public_address pubkey;
diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 03058c4f1..506f27c4a 100644
+index 03058c4..39454ca 100644
--- a/src/device/device_ledger.hpp
+++ b/src/device/device_ledger.hpp
@@ -35,6 +35,7 @@
@@ -405,7 +406,7 @@ index 03058c4f1..506f27c4a 100644
mutable boost::mutex command_locker;
//IO
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+ hw::io::device_io_dummy hw_device;
+#else
hw::io::device_io_hid hw_device;
@@ -414,14 +415,14 @@ index 03058c4f1..506f27c4a 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 ee000e7ab..375edb4f1 100644
+index 4fb5f75..c73f38e 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -48,6 +48,9 @@
#include <boost/locale.hpp>
#include <boost/filesystem.hpp>
#include "bc-ur/src/bc-ur.hpp"
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include "device/device_io_dummy.hpp"
+#endif
@@ -434,8 +435,8 @@ index ee000e7ab..375edb4f1 100644
+
+// HIDAPI_DUMMY
+bool WalletImpl::getStateIsConnected() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::stateIsConnected;
@@ -443,8 +444,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+unsigned char* WalletImpl::getSendToDevice() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::sendToDevice;
@@ -452,8 +453,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+size_t WalletImpl::getSendToDeviceLength() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::sendToDeviceLength;
@@ -461,8 +462,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+unsigned char* WalletImpl::getReceivedFromDevice() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::receivedFromDevice;
@@ -470,8 +471,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+size_t WalletImpl::getReceivedFromDeviceLength() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
@@ -479,8 +480,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+bool WalletImpl::getWaitsForDeviceSend() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
@@ -488,8 +489,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+bool WalletImpl::getWaitsForDeviceReceive() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::waitsForDeviceReceive;
@@ -497,8 +498,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
@@ -510,8 +511,8 @@ index ee000e7ab..375edb4f1 100644
+}
+
+void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
@@ -524,7 +525,7 @@ index ee000e7ab..375edb4f1 100644
+
} // namespace
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index edf8bb8ce..4e9c21ecb 100644
+index edf8bb8..4e9c21e 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -301,6 +301,24 @@ private:
@@ -553,7 +554,7 @@ index edf8bb8ce..4e9c21ecb 100644
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 764adbfbf..53ec4abfc 100644
+index 764adbf..53ec4ab 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -1150,6 +1150,18 @@ struct Wallet
@@ -575,6 +576,29 @@ index 764adbfbf..53ec4abfc 100644
};
/**
+diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
+index e81b8f8..277be6a 100644
+--- a/src/wallet/api/wallet_manager.cpp
++++ b/src/wallet/api/wallet_manager.cpp
+@@ -188,10 +188,14 @@ bool WalletManagerImpl::verifyWalletPassword(const std::string &keys_file_name,
+
+ bool WalletManagerImpl::queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds) const
+ {
+- hw::device::device_type type;
+- bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
+- device_type = static_cast<Wallet::Device>(type);
+- return r;
++ try {
++ hw::device::device_type type;
++ bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
++ device_type = static_cast<Wallet::Device>(type);
++ return r;
++ } catch (...) {
++ return false;
++ }
+ }
+
+ std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
--
2.39.5 (Apple Git-154)
diff --git a/patches/wownero/0010-polyseed.patch b/patches/monero/0008-polyseed.patch
index e7711c9..9289fc0 100644
--- a/patches/wownero/0010-polyseed.patch
+++ b/patches/monero/0008-polyseed.patch
@@ -1,45 +1,35 @@
-From d1e443859c1b9e6845874fc30f7958da389846b3 Mon Sep 17 00:00:00 2001
+From ed2ce176ea5f1bbe81069a3df4601a141b533b95 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 09:42:37 +0100
-Subject: [PATCH 10/17] polyseed
+Subject: [PATCH 08/14] polyseed
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
---
- .gitmodules | 6 +
- CMakeLists.txt | 4 +-
- contrib/depends/hosts/darwin.mk | 2 +
- contrib/depends/hosts/linux.mk | 8 +-
- contrib/depends/packages/packages.mk | 2 +-
- contrib/depends/packages/polyseed.mk | 28 +++
- contrib/depends/packages/sodium.mk | 2 +-
- .../polyseed/0001-disable-soname.patch | 48 +++++
- .../patches/polyseed/force-static-mingw.patch | 23 +++
- contrib/epee/include/wipeable_string.h | 7 +
- contrib/epee/src/wipeable_string.cpp | 10 +
- external/CMakeLists.txt | 2 +
- external/polyseed | 1 +
- external/utf8proc | 1 +
- src/CMakeLists.txt | 1 +
- src/cryptonote_basic/CMakeLists.txt | 1 +
- src/cryptonote_basic/account.cpp | 23 ++-
- src/cryptonote_basic/account.h | 6 +
- src/cryptonote_config.h | 2 +
- src/polyseed/CMakeLists.txt | 25 +++
- src/polyseed/pbkdf2.c | 85 ++++++++
- src/polyseed/pbkdf2.h | 46 +++++
- src/polyseed/polyseed.cpp | 182 ++++++++++++++++++
- src/polyseed/polyseed.hpp | 167 ++++++++++++++++
- src/wallet/api/wallet.cpp | 70 +++++++
- src/wallet/api/wallet.h | 10 +
- src/wallet/api/wallet2_api.h | 25 +++
- src/wallet/api/wallet_manager.cpp | 9 +
- src/wallet/api/wallet_manager.h | 10 +
- src/wallet/wallet2.cpp | 99 ++++++++--
- src/wallet/wallet2.h | 30 ++-
- 31 files changed, 912 insertions(+), 23 deletions(-)
- create mode 100644 contrib/depends/packages/polyseed.mk
- create mode 100644 contrib/depends/patches/polyseed/0001-disable-soname.patch
- create mode 100644 contrib/depends/patches/polyseed/force-static-mingw.patch
+ .gitmodules | 6 +
+ CMakeLists.txt | 4 +-
+ contrib/epee/include/wipeable_string.h | 7 +
+ contrib/epee/src/wipeable_string.cpp | 10 ++
+ external/CMakeLists.txt | 2 +
+ external/polyseed | 1 +
+ external/utf8proc | 1 +
+ src/CMakeLists.txt | 1 +
+ src/cryptonote_basic/CMakeLists.txt | 1 +
+ src/cryptonote_basic/account.cpp | 23 +++-
+ src/cryptonote_basic/account.h | 6 +
+ src/cryptonote_config.h | 2 +
+ src/polyseed/CMakeLists.txt | 25 ++++
+ src/polyseed/pbkdf2.c | 85 ++++++++++++
+ src/polyseed/pbkdf2.h | 46 +++++++
+ src/polyseed/polyseed.cpp | 182 +++++++++++++++++++++++++
+ src/polyseed/polyseed.hpp | 167 +++++++++++++++++++++++
+ src/wallet/api/wallet.cpp | 70 ++++++++++
+ src/wallet/api/wallet.h | 10 ++
+ src/wallet/api/wallet2_api.h | 25 ++++
+ src/wallet/api/wallet_manager.cpp | 9 ++
+ src/wallet/api/wallet_manager.h | 10 ++
+ src/wallet/wallet2.cpp | 100 ++++++++++++--
+ src/wallet/wallet2.h | 30 +++-
+ 24 files changed, 805 insertions(+), 18 deletions(-)
create mode 160000 external/polyseed
create mode 160000 external/utf8proc
create mode 100644 src/polyseed/CMakeLists.txt
@@ -49,34 +39,36 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
create mode 100644 src/polyseed/polyseed.hpp
diff --git a/.gitmodules b/.gitmodules
-index b24855d9b..589676649 100644
+index 72af74d..b838e84 100644
--- a/.gitmodules
+++ b/.gitmodules
-@@ -20,3 +20,9 @@
- path = external/bc-ur
- url = https://github.com/MrCyjaneK/bc-ur
- branch = misc
+@@ -11,6 +11,12 @@
+ path = external/randomx
+ url = https://github.com/MrCyjaneK/RandomX
+ branch = cyjan-fix-ios
+[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
-\ No newline at end of file
+ [submodule "external/supercop"]
+ path = external/supercop
+ url = https://github.com/monero-project/supercop
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index abe44eca5..85a62ef7b 100644
+index 43ef6cd..e7fa90a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -372,6 +372,8 @@ if(NOT MANUAL_SUBMODULES)
- #check_submodule(external/trezor-common)
- check_submodule(external/randomwow)
+@@ -371,6 +371,8 @@ if(NOT MANUAL_SUBMODULES)
+ check_submodule(external/trezor-common)
+ check_submodule(external/randomx)
check_submodule(external/supercop)
+ check_submodule(external/polyseed)
+ check_submodule(external/utf8proc)
endif()
endif()
-@@ -461,7 +463,7 @@ endif()
+@@ -460,7 +462,7 @@ endif()
# elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
# set(BSDI TRUE)
@@ -85,185 +77,8 @@ index abe44eca5..85a62ef7b 100644
if(APPLE)
cmake_policy(SET CMP0042 NEW)
-diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
-index 83d83036b..b14ee5c5b 100644
---- a/contrib/depends/hosts/darwin.mk
-+++ b/contrib/depends/hosts/darwin.mk
-@@ -8,6 +8,8 @@ endif
- darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
- darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
-
-+darwin_RANLIB=$(host_prefix)/native/bin/$(host)-ranlib
-+
- darwin_CFLAGS=-pipe
- darwin_CXXFLAGS=$(darwin_CFLAGS)
- darwin_ARFLAGS=cr
-diff --git a/contrib/depends/hosts/linux.mk b/contrib/depends/hosts/linux.mk
-index 912fdb03c..b79799f30 100644
---- a/contrib/depends/hosts/linux.mk
-+++ b/contrib/depends/hosts/linux.mk
-@@ -11,15 +11,15 @@ linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
- linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
-
- ifeq (86,$(findstring 86,$(build_arch)))
--i686_linux_CC=gcc -m32
--i686_linux_CXX=g++ -m32
-+i686_linux_CC=i686-linux-gnu-gcc
-+i686_linux_CXX=i686-linux-gnu-g++
- i686_linux_AR=ar
- i686_linux_RANLIB=ranlib
- i686_linux_NM=nm
- i686_linux_STRIP=strip
-
--x86_64_linux_CC=gcc -m64
--x86_64_linux_CXX=g++ -m64
-+x86_64_linux_CC=x86_64-linux-gnu-gcc
-+x86_64_linux_CXX=x86_64-linux-gnu-g++
- x86_64_linux_AR=ar
- x86_64_linux_RANLIB=ranlib
- x86_64_linux_NM=nm
-diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
-index d2d1eca85..8783d4955 100644
---- a/contrib/depends/packages/packages.mk
-+++ b/contrib/depends/packages/packages.mk
-@@ -1,4 +1,4 @@
--packages:=boost openssl zeromq libiconv expat unbound
-+packages:=boost openssl zeromq libiconv expat unbound polyseed
-
- # ccache is useless in gitian builds
- ifneq ($(GITIAN),1)
-diff --git a/contrib/depends/packages/polyseed.mk b/contrib/depends/packages/polyseed.mk
-new file mode 100644
-index 000000000..0071b20f3
---- /dev/null
-+++ b/contrib/depends/packages/polyseed.mk
-@@ -0,0 +1,28 @@
-+package=polyseed
-+$(package)_version=2.0.0
-+$(package)_download_path=https://github.com/tevador/$(package)/archive/refs/tags/
-+$(package)_download_file=v$($(package)_version).tar.gz
-+$(package)_file_name=$(package)-$($(package)_version).tar.gz
-+$(package)_sha256_hash=f36282fcbcd68d32461b8230c89e1a40661bd46b91109681cec637433004135a
-+$(package)_patches=force-static-mingw.patch 0001-disable-soname.patch
-+
-+define $(package)_preprocess_cmds
-+ patch -p1 < $($(package)_patch_dir)/force-static-mingw.patch &&\
-+ patch -p1 < $($(package)_patch_dir)/0001-disable-soname.patch
-+endef
-+
-+define $(package)_config_cmds
-+ CC="$($(package)_cc)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" .
-+endef
-+
-+define $(package)_set_vars
-+ $(package)_build_opts=CC="$($(package)_cc)"
-+endef
-+
-+define $(package)_build_cmds
-+ CC="$($(package)_cc)" $(MAKE)
-+endef
-+
-+define $(package)_stage_cmds
-+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
-+endef
-diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
-index 87b34599e..68a5b48ba 100644
---- a/contrib/depends/packages/sodium.mk
-+++ b/contrib/depends/packages/sodium.mk
-@@ -6,7 +6,7 @@ $(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e
- $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
-
- define $(package)_set_vars
--$(package)_config_opts=--enable-static --disable-shared
-+$(package)_config_opts=--enable-static --disable-shared --with-pic
- $(package)_config_opts+=--prefix=$(host_prefix)
- endef
-
-diff --git a/contrib/depends/patches/polyseed/0001-disable-soname.patch b/contrib/depends/patches/polyseed/0001-disable-soname.patch
-new file mode 100644
-index 000000000..bd97dd394
---- /dev/null
-+++ b/contrib/depends/patches/polyseed/0001-disable-soname.patch
-@@ -0,0 +1,48 @@
-+From aabafcfc0572651436d024a635483c49042fad7f Mon Sep 17 00:00:00 2001
-+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-+Date: Thu, 28 Mar 2024 00:32:51 +0100
-+Subject: [PATCH] disable soname
-+
-+---
-+ CMakeLists.txt | 16 +++++++++-------
-+ 1 file changed, 9 insertions(+), 7 deletions(-)
-+
-+diff --git a/CMakeLists.txt b/CMakeLists.txt
-+index 8a8e7c2..5301353 100644
-+--- a/CMakeLists.txt
-++++ b/CMakeLists.txt
-+@@ -36,6 +36,7 @@ include_directories(polyseed
-+ target_compile_definitions(polyseed PRIVATE POLYSEED_SHARED)
-+ set_target_properties(polyseed PROPERTIES VERSION 2.0.0
-+ SOVERSION 2
-++ NO_SONAME 1
-+ C_STANDARD 11
-+ C_STANDARD_REQUIRED ON)
-+
-+@@ -45,16 +46,17 @@ include_directories(polyseed_static
-+ include/)
-+ target_compile_definitions(polyseed_static PRIVATE POLYSEED_STATIC)
-+ set_target_properties(polyseed_static PROPERTIES OUTPUT_NAME polyseed
-++ NO_SONAME 1
-+ C_STANDARD 11
-+ C_STANDARD_REQUIRED ON)
-+
-+-add_executable(polyseed-tests
-+- tests/tests.c)
-+-include_directories(polyseed-tests
-+- include/)
-+-target_compile_definitions(polyseed-tests PRIVATE POLYSEED_STATIC)
-+-target_link_libraries(polyseed-tests
-+- PRIVATE polyseed_static)
-++# add_executable(polyseed-tests
-++# tests/tests.c)
-++# include_directories(polyseed-tests
-++# include/)
-++# target_compile_definitions(polyseed-tests PRIVATE POLYSEED_STATIC)
-++# target_link_libraries(polyseed-tests
-++# PRIVATE polyseed_static)
-+
-+ include(GNUInstallDirs)
-+ install(TARGETS polyseed polyseed_static
-+--
-+2.39.2
-diff --git a/contrib/depends/patches/polyseed/force-static-mingw.patch b/contrib/depends/patches/polyseed/force-static-mingw.patch
-new file mode 100644
-index 000000000..f05cb2b6a
---- /dev/null
-+++ b/contrib/depends/patches/polyseed/force-static-mingw.patch
-@@ -0,0 +1,23 @@
-+--- a/include/polyseed.h
-++++ b/include/polyseed.h
-+@@ -93,13 +93,13 @@ Shared/static library definitions
-+ - define POLYSEED_STATIC when linking to the static library
-+ */
-+ #if defined(_WIN32) || defined(__CYGWIN__)
-+- #ifdef POLYSEED_SHARED
-+- #define POLYSEED_API __declspec(dllexport)
-+- #elif !defined(POLYSEED_STATIC)
-+- #define POLYSEED_API __declspec(dllimport)
-+- #else
-+- #define POLYSEED_API
-+- #endif
-++// #ifdef POLYSEED_SHARED
-++// #define POLYSEED_API __declspec(dllexport)
-++// #elif !defined(POLYSEED_STATIC)
-++// #define POLYSEED_API __declspec(dllimport)
-++// #else
-++ #define POLYSEED_API
-++// #endif
-+ #define POLYSEED_PRIVATE
-+ #else
-+ #ifdef POLYSEED_SHARED
diff --git a/contrib/epee/include/wipeable_string.h b/contrib/epee/include/wipeable_string.h
-index 65977cd97..594e15de4 100644
+index 65977cd..594e15d 100644
--- a/contrib/epee/include/wipeable_string.h
+++ b/contrib/epee/include/wipeable_string.h
@@ -34,6 +34,7 @@
@@ -288,7 +103,7 @@ index 65977cd97..594e15de4 100644
private:
void grow(size_t sz, size_t reserved = 0);
diff --git a/contrib/epee/src/wipeable_string.cpp b/contrib/epee/src/wipeable_string.cpp
-index b016f2f48..f2f365b1b 100644
+index b016f2f..f2f365b 100644
--- a/contrib/epee/src/wipeable_string.cpp
+++ b/contrib/epee/src/wipeable_string.cpp
@@ -261,4 +261,14 @@ wipeable_string &wipeable_string::operator=(const wipeable_string &other)
@@ -307,32 +122,33 @@ index b016f2f48..f2f365b1b 100644
+
}
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index 88a7bb0b5..95be500b1 100644
+index f9ed6a6..8fcf792 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
-@@ -73,4 +73,6 @@ add_subdirectory(db_drivers)
+@@ -69,5 +69,7 @@ endif()
+ add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
- add_subdirectory(bc-ur)
+add_subdirectory(polyseed EXCLUDE_FROM_ALL)
+add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
- add_subdirectory(randomwow EXCLUDE_FROM_ALL)
+ add_subdirectory(bc-ur)
+ add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/external/polyseed b/external/polyseed
new file mode 160000
-index 000000000..bd79f5014
+index 0000000..bd79f50
--- /dev/null
+++ b/external/polyseed
@@ -0,0 +1 @@
+Subproject commit bd79f5014c331273357277ed8a3d756fb61b9fa1
diff --git a/external/utf8proc b/external/utf8proc
new file mode 160000
-index 000000000..3de4596fb
+index 0000000..3de4596
--- /dev/null
+++ b/external/utf8proc
@@ -0,0 +1 @@
+Subproject commit 3de4596fbe28956855df2ecb3c11c0bbc3535838
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9216bcaa5..c043ba150 100644
+index 3335d3c..06b708c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -95,6 +95,7 @@ add_subdirectory(net)
@@ -344,7 +160,7 @@ index 9216bcaa5..c043ba150 100644
if(NOT IOS)
add_subdirectory(serialization)
diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt
-index 1414be1b2..414936a05 100644
+index 1414be1..414936a 100644
--- a/src/cryptonote_basic/CMakeLists.txt
+++ b/src/cryptonote_basic/CMakeLists.txt
@@ -71,6 +71,7 @@ target_link_libraries(cryptonote_basic
@@ -356,7 +172,7 @@ index 1414be1b2..414936a05 100644
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_SERIALIZATION_LIBRARY}
diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
-index 4e87d4477..2d556f285 100644
+index 4e87d44..2d556f2 100644
--- a/src/cryptonote_basic/account.cpp
+++ b/src/cryptonote_basic/account.cpp
@@ -87,12 +87,16 @@ DISABLE_VS_WARNINGS(4244 4345)
@@ -409,7 +225,7 @@ index 4e87d4477..2d556f285 100644
{
m_keys.m_account_address.m_spend_public_key = spend_public_key;
diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h
-index 93d1d28f0..1f76febce 100644
+index 93d1d28..1f76feb 100644
--- a/src/cryptonote_basic/account.h
+++ b/src/cryptonote_basic/account.h
@@ -33,6 +33,7 @@
@@ -447,21 +263,21 @@ index 93d1d28f0..1f76febce 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 8b5091a46..d9151e8d2 100644
+index f9e6a6c..3af3a63 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
-@@ -219,6 +219,8 @@
+@@ -207,6 +207,8 @@
#define DNS_BLOCKLIST_LIFETIME (86400 * 8)
-+#define POLYSEED_COIN POLYSEED_WOWNERO
++#define POLYSEED_COIN POLYSEED_MONERO
+
//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.
// (1+32) + (1+1+16*32) + (1+16*32) = 1060
diff --git a/src/polyseed/CMakeLists.txt b/src/polyseed/CMakeLists.txt
new file mode 100644
-index 000000000..cca4eb746
+index 0000000..cca4eb7
--- /dev/null
+++ b/src/polyseed/CMakeLists.txt
@@ -0,0 +1,25 @@
@@ -492,7 +308,7 @@ index 000000000..cca4eb746
+)
diff --git a/src/polyseed/pbkdf2.c b/src/polyseed/pbkdf2.c
new file mode 100644
-index 000000000..1c45f4708
+index 0000000..1c45f47
--- /dev/null
+++ b/src/polyseed/pbkdf2.c
@@ -0,0 +1,85 @@
@@ -584,7 +400,7 @@ index 000000000..1c45f4708
\ No newline at end of file
diff --git a/src/polyseed/pbkdf2.h b/src/polyseed/pbkdf2.h
new file mode 100644
-index 000000000..f6253b9d7
+index 0000000..f6253b9
--- /dev/null
+++ b/src/polyseed/pbkdf2.h
@@ -0,0 +1,46 @@
@@ -637,7 +453,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..231a48a94
+index 0000000..231a48a
--- /dev/null
+++ b/src/polyseed/polyseed.cpp
@@ -0,0 +1,182 @@
@@ -825,7 +641,7 @@ index 000000000..231a48a94
+}
diff --git a/src/polyseed/polyseed.hpp b/src/polyseed/polyseed.hpp
new file mode 100644
-index 000000000..2c8c777a7
+index 0000000..2c8c777
--- /dev/null
+++ b/src/polyseed/polyseed.hpp
@@ -0,0 +1,167 @@
@@ -998,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 375edb4f1..0d785360a 100644
+index c73f38e..67ac90a 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
@@ -1086,7 +902,7 @@ index 375edb4f1..0d785360a 100644
{
return m_wallet->get_seed_language();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index 4e9c21ecb..32e12284b 100644
+index 4e9c21e..32e1228 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -79,9 +79,19 @@ public:
@@ -1110,7 +926,7 @@ index 4e9c21ecb..32e12284b 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 53ec4abfc..be1c3704e 100644
+index 53ec4ab..be1c370 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -709,6 +709,10 @@ struct Wallet
@@ -1153,7 +969,7 @@ index 53ec4abfc..be1c3704e 100644
* \brief Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted
* \param wallet previously opened / created wallet instance
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index e81b8f83a..c79fe25d6 100644
+index 277be6a..da2056d 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -156,6 +156,15 @@ Wallet *WalletManagerImpl::createWalletFromDevice(const std::string &path,
@@ -1173,7 +989,7 @@ index e81b8f83a..c79fe25d6 100644
{
WalletImpl * wallet_ = dynamic_cast<WalletImpl*>(wallet);
diff --git a/src/wallet/api/wallet_manager.h b/src/wallet/api/wallet_manager.h
-index a223e1df9..28fcd36c9 100644
+index a223e1d..28fcd36 100644
--- a/src/wallet/api/wallet_manager.h
+++ b/src/wallet/api/wallet_manager.h
@@ -75,6 +75,16 @@ public:
@@ -1194,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 671fa5298..3e49c21f8 100644
+index dfa3213..fa346a9 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -92,6 +92,7 @@ using namespace epee;
@@ -1209,8 +1025,8 @@ index 671fa5298..3e49c21f8 100644
m_enable_multisig(false),
m_pool_info_query_time(0),
m_has_ever_refreshed_from_node(false),
-- m_allow_mismatched_daemon_version(true)
-+ m_allow_mismatched_daemon_version(true),
+- m_allow_mismatched_daemon_version(false)
++ m_allow_mismatched_daemon_version(false),
+ m_polyseed(false)
{
set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
@@ -1236,7 +1052,7 @@ index 671fa5298..3e49c21f8 100644
bool wallet2::get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase) const
{
bool ready;
-@@ -4792,6 +4808,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
+@@ -4789,6 +4805,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());
@@ -1246,15 +1062,15 @@ index 671fa5298..3e49c21f8 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());
-@@ -5031,6 +5050,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5028,6 +5047,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_custom_background_key = boost::none;
+ m_polyseed = false;
}
else if(json.IsObject())
{
-@@ -5271,6 +5291,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5268,6 +5288,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;
@@ -1264,7 +1080,7 @@ index 671fa5298..3e49c21f8 100644
// Load encryption key used to encrypt background cache
crypto::chacha_key custom_background_key;
m_custom_background_key = boost::none;
-@@ -5590,6 +5613,48 @@ void wallet2::init_type(hw::device::device_type device_type)
+@@ -5587,6 +5610,48 @@ void wallet2::init_type(hw::device::device_type device_type)
m_key_device_type = device_type;
}
@@ -1313,7 +1129,7 @@ index 671fa5298..3e49c21f8 100644
/*!
* \brief Generates a wallet or restores one. Assumes the multisig setup
* has already completed for the provided multisig info.
-@@ -5717,7 +5782,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5714,7 +5779,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
return retval;
}
@@ -1322,7 +1138,7 @@ index 671fa5298..3e49c21f8 100644
{
// -1 month for fluctuations in block time and machine date/time setup.
// avg seconds per block
-@@ -5741,7 +5806,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5738,7 +5803,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.
@@ -1331,19 +1147,25 @@ index 671fa5298..3e49c21f8 100644
uint64_t target_height = get_daemon_blockchain_target_height(err);
if (err.empty()) {
if (target_height < height)
-@@ -13634,9 +13699,10 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
+@@ -13635,7 +13700,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 = fork_block + ((t > 0 ? t : time(NULL)) - fork_time)/seconds_per_block;
- LOG_PRINT_L2("Calculated blockchain height: " << approx_blockchain_height);
- return approx_blockchain_height;
- }
-@@ -15771,15 +15837,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
+ // time of v2 fork
+ const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658;
+@@ -13644,7 +13709,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const
+ // avg seconds per block
+ const int seconds_per_block = DIFFICULTY_TARGET_V2;
+ // Calculated blockchain height
+- uint64_t approx_blockchain_height = fork_block + (time(NULL) - fork_time)/seconds_per_block;
++ uint64_t approx_blockchain_height = fork_block + ((t > 0 ? t : time(NULL)) - fork_time)/seconds_per_block;
+ // 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)
+@@ -15783,15 +15848,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)
{
@@ -1359,7 +1181,7 @@ index 671fa5298..3e49c21f8 100644
std::tm date = { 0, 0, 0, 0, 0, 0, 0, 0 };
date.tm_year = year - 1900;
date.tm_mon = month - 1;
-@@ -15788,7 +15845,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
+@@ -15800,7 +15856,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");
}
@@ -1384,7 +1206,7 @@ index 671fa5298..3e49c21f8 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 80ff0698d..c26349ce3 100644
+index 1d7e430..91cf2a3 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -72,6 +72,7 @@
diff --git a/patches/wownero/0011-coin-control.patch b/patches/monero/0009-coin-control.patch
index f786777..1aac12a 100644
--- a/patches/wownero/0011-coin-control.patch
+++ b/patches/monero/0009-coin-control.patch
@@ -1,7 +1,7 @@
-From 7d9d947f049c39aa9e5e4c7cb37c03e63eaf3187 Mon Sep 17 00:00:00 2001
+From 4d897d9ee1d24710500f4d58e9ccd79fb48cf1d2 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 11:07:57 +0100
-Subject: [PATCH 11/17] coin control
+Subject: [PATCH 09/14] coin control
---
src/simplewallet/simplewallet.cpp | 2 +-
@@ -22,10 +22,10 @@ Subject: [PATCH 11/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 8c5122097..cfdb8935f 100644
+index 2c51337..645bd37 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
-@@ -6981,7 +6981,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
+@@ -6930,7 +6930,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,
@@ -35,7 +35,7 @@ index 8c5122097..cfdb8935f 100644
if (ptx_vector.empty())
{
diff --git a/src/wallet/api/CMakeLists.txt b/src/wallet/api/CMakeLists.txt
-index af7948d8a..bb740e2ac 100644
+index af7948d..bb740e2 100644
--- a/src/wallet/api/CMakeLists.txt
+++ b/src/wallet/api/CMakeLists.txt
@@ -40,7 +40,9 @@ set(wallet_api_sources
@@ -62,7 +62,7 @@ index af7948d8a..bb740e2ac 100644
${wallet_api_private_headers})
diff --git a/src/wallet/api/coins.cpp b/src/wallet/api/coins.cpp
new file mode 100644
-index 000000000..ef12141cf
+index 0000000..ef12141
--- /dev/null
+++ b/src/wallet/api/coins.cpp
@@ -0,0 +1,186 @@
@@ -254,7 +254,7 @@ index 000000000..ef12141cf
+} // namespace
diff --git a/src/wallet/api/coins.h b/src/wallet/api/coins.h
new file mode 100644
-index 000000000..b7a0a8642
+index 0000000..b7a0a86
--- /dev/null
+++ b/src/wallet/api/coins.h
@@ -0,0 +1,40 @@
@@ -300,7 +300,7 @@ index 000000000..b7a0a8642
+#endif //FEATHER_COINS_H
diff --git a/src/wallet/api/coins_info.cpp b/src/wallet/api/coins_info.cpp
new file mode 100644
-index 000000000..5f2c4e1e4
+index 0000000..5f2c4e1
--- /dev/null
+++ b/src/wallet/api/coins_info.cpp
@@ -0,0 +1,122 @@
@@ -428,7 +428,7 @@ index 000000000..5f2c4e1e4
+namespace Bitmonero = Monero;
diff --git a/src/wallet/api/coins_info.h b/src/wallet/api/coins_info.h
new file mode 100644
-index 000000000..c43e45abd
+index 0000000..c43e45a
--- /dev/null
+++ b/src/wallet/api/coins_info.h
@@ -0,0 +1,71 @@
@@ -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 0d785360a..ff1baac5c 100644
+index 67ac90a..6bb3a21 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -35,6 +35,7 @@
@@ -640,7 +640,7 @@ index 0d785360a..ff1baac5c 100644
{
return m_subaddress.get();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index 32e12284b..a82f270e4 100644
+index 32e1228..a82f270 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -46,6 +46,7 @@ class PendingTransactionImpl;
@@ -693,7 +693,7 @@ index 32e12284b..a82f270e4 100644
// multi-threaded refresh stuff
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index be1c3704e..013b5bcba 100644
+index be1c370..013b5bc 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -263,6 +263,51 @@ struct AddressBook
@@ -777,7 +777,7 @@ index be1c3704e..013b5bcba 100644
virtual SubaddressAccount * subaddressAccount() = 0;
virtual void setListener(WalletListener *) = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 3e49c21f8..4d756567f 100644
+index fa346a9..d060bf9 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2094,12 +2094,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
@@ -821,7 +821,7 @@ index 3e49c21f8..4d756567f 100644
size_t wallet2::get_transfer_details(const crypto::key_image &ki) const
{
for (size_t idx = 0; idx < m_transfers.size(); ++idx)
-@@ -2523,6 +2544,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2521,6 +2542,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)
{
@@ -829,7 +829,7 @@ index 3e49c21f8..4d756567f 100644
m_transfers.push_back(transfer_details{});
transfer_details& td = m_transfers.back();
td.m_block_height = height;
-@@ -2626,6 +2648,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2624,6 +2646,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
uint64_t extra_amount = amount - burnt;
if (!pool)
{
@@ -837,7 +837,7 @@ index 3e49c21f8..4d756567f 100644
transfer_details &td = m_transfers[kit->second];
td.m_block_height = height;
td.m_internal_output_index = o;
-@@ -10497,7 +10520,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
+@@ -10500,7 +10523,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
LOG_PRINT_L2("transfer_selected_rct done");
}
@@ -846,7 +846,7 @@ index 3e49c21f8..4d756567f 100644
{
std::vector<size_t> picks;
float current_output_relatdness = 1.0f;
-@@ -10508,6 +10531,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10511,6 +10534,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];
@@ -856,7 +856,7 @@ index 3e49c21f8..4d756567f 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)
-@@ -10528,6 +10554,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10531,6 +10557,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];
@@ -866,7 +866,7 @@ index 3e49c21f8..4d756567f 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)
-@@ -10539,6 +10568,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10542,6 +10571,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];
@@ -876,7 +876,7 @@ index 3e49c21f8..4d756567f 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) << "]");
-@@ -11111,7 +11143,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
+@@ -11114,7 +11146,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.
@@ -885,7 +885,7 @@ index 3e49c21f8..4d756567f 100644
{
//ensure device is let in NONE mode in any case
hw::device &hwdev = m_account.get_device();
-@@ -11319,6 +11351,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11322,6 +11354,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];
@@ -895,7 +895,7 @@ index 3e49c21f8..4d756567f 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));
-@@ -11410,7 +11445,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11413,7 +11448,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);
@@ -904,7 +904,7 @@ index 3e49c21f8..4d756567f 100644
if (!preferred_inputs.empty())
{
string s;
-@@ -11889,7 +11924,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
+@@ -11892,7 +11927,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
return true;
}
@@ -913,7 +913,7 @@ index 3e49c21f8..4d756567f 100644
{
std::vector<size_t> unused_transfers_indices;
std::vector<size_t> unused_dust_indices;
-@@ -11918,6 +11953,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
+@@ -11921,6 +11956,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];
@@ -924,7 +924,7 @@ index 3e49c21f8..4d756567f 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 c26349ce3..a48ba33b6 100644
+index 91cf2a3..bc16d52 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1209,8 +1209,8 @@ private:
diff --git a/patches/wownero/0012-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/monero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
index 3868907..6917daa 100644
--- a/patches/wownero/0012-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
+++ b/patches/monero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
@@ -1,7 +1,7 @@
-From fc519329a5eaeaacd53ceb5109608069d57ac553 Mon Sep 17 00:00:00 2001
+From 42aca87b69ecdc9fb24d14dd947f8bbffc7f3500 Mon Sep 17 00:00:00 2001
From: M <m@cakewallet.com>
Date: Fri, 21 Apr 2023 15:43:47 -0400
-Subject: [PATCH 12/17] Add hex encoding and tx key getter for
+Subject: [PATCH 10/14] Add hex encoding and tx key getter for
PendingTransction in wallet api.
---
@@ -11,7 +11,7 @@ Subject: [PATCH 12/17] Add hex encoding and tx key getter for
3 files changed, 20 insertions(+)
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp
-index 9c3c26ee5..1f714d229 100644
+index 9c3c26e..1f714d2 100644
--- a/src/wallet/api/pending_transaction.cpp
+++ b/src/wallet/api/pending_transaction.cpp
@@ -80,6 +80,22 @@ std::vector<std::string> PendingTransactionImpl::txid() const
@@ -38,7 +38,7 @@ index 9c3c26ee5..1f714d229 100644
{
diff --git a/src/wallet/api/pending_transaction.h b/src/wallet/api/pending_transaction.h
-index 403bfe281..0cc6c58e9 100644
+index 403bfe2..0cc6c58 100644
--- a/src/wallet/api/pending_transaction.h
+++ b/src/wallet/api/pending_transaction.h
@@ -59,6 +59,8 @@ public:
@@ -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 013b5bcba..f421fdc05 100644
+index 013b5bc..f421fdc 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -127,6 +127,8 @@ struct PendingTransaction
diff --git a/patches/wownero/0013-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch
index 033050d..12d82ff 100644
--- a/patches/wownero/0013-Add-recoverDeterministicWalletFromSpendKey.patch
+++ b/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch
@@ -1,7 +1,7 @@
-From 3523d4ea3449b64065f7fa512a0017581b76c1c8 Mon Sep 17 00:00:00 2001
+From ccddf3be96fd08d1eccbb58a7e8f8c98d07b07f2 Mon Sep 17 00:00:00 2001
From: Konstantin Ullrich <konstantinullrich12@gmail.com>
Date: Wed, 11 Oct 2023 16:47:59 +0200
-Subject: [PATCH 13/17] Add recoverDeterministicWalletFromSpendKey
+Subject: [PATCH 11/14] 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 ff1baac5c..685432597 100644
+index 6bb3a21..5734aff 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
@@ -59,7 +59,7 @@ index ff1baac5c..685432597 100644
{
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index a82f270e4..9e1fbb40b 100644
+index a82f270..9e1fbb4 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -77,6 +77,10 @@ public:
@@ -74,7 +74,7 @@ index a82f270e4..9e1fbb40b 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 f421fdc05..c8d6bb179 100644
+index f421fdc..c8d6bb1 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -1323,6 +1323,25 @@ struct WalletManager
@@ -104,7 +104,7 @@ index f421fdc05..c8d6bb179 100644
* \deprecated this method creates a wallet WITHOUT a passphrase, use createWalletFromKeys(..., password, ...) instead
* \brief recovers existing wallet using keys. Creates a view only wallet if spend key is omitted
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index c79fe25d6..f88bd9e64 100644
+index da2056d..c200f52 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -127,6 +127,22 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
@@ -131,7 +131,7 @@ index c79fe25d6..f88bd9e64 100644
const std::string &password,
NetworkType nettype,
diff --git a/src/wallet/api/wallet_manager.h b/src/wallet/api/wallet_manager.h
-index 28fcd36c9..be3ff8184 100644
+index 28fcd36..be3ff81 100644
--- a/src/wallet/api/wallet_manager.h
+++ b/src/wallet/api/wallet_manager.h
@@ -67,6 +67,13 @@ public:
diff --git a/patches/wownero/0015-add-monero-submodule-support.patch b/patches/monero/0012-add-monero-submodule-support.patch
index 4ef6bd2..d993a14 100644
--- a/patches/wownero/0015-add-monero-submodule-support.patch
+++ b/patches/monero/0012-add-monero-submodule-support.patch
@@ -1,7 +1,7 @@
-From 24bc8f2b4ead8cb848a979140129618d04ebc762 Mon Sep 17 00:00:00 2001
+From d8ab8f6fffd6235e935400f0fe750c1ba29b85e7 Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Thu, 7 Nov 2024 16:46:24 +0000
-Subject: [PATCH 15/17] add monero submodule support
+Subject: [PATCH 12/14] add monero submodule support
---
CMakeLists.txt | 6 +++---
@@ -10,7 +10,7 @@ Subject: [PATCH 15/17] add monero submodule support
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 85a62ef7b..763d240fc 100644
+index e7fa90a..b995a68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,9 +223,9 @@ function(forbid_undefined_symbols)
@@ -25,7 +25,7 @@ index 85a62ef7b..763d240fc 100644
endif()
add_library(l0 SHARED incorrect_source.cpp)
add_library(l1 MODULE incorrect_source.cpp)
-@@ -391,7 +391,7 @@ else()
+@@ -390,7 +390,7 @@ else()
endif()
list(INSERT CMAKE_MODULE_PATH 0
@@ -35,7 +35,7 @@ index 85a62ef7b..763d240fc 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
+index 7ecf5f6..89fb9d1 100644
--- a/cmake/CheckLinkerFlag.cmake
+++ b/cmake/CheckLinkerFlag.cmake
@@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
@@ -48,10 +48,10 @@ index 7ecf5f610..89fb9d167 100644
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${flag}")
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index 3cc6b278f..071434486 100644
+index d24b4c5..91f6925 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
-@@ -1162,7 +1162,7 @@ namespace tools
+@@ -1163,7 +1163,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);
diff --git a/patches/wownero/0017-iOS-depends-build.patch b/patches/monero/0013-fix-iOS-depends-build.patch
index f8d7134..97c23c6 100644
--- a/patches/wownero/0017-iOS-depends-build.patch
+++ b/patches/monero/0013-fix-iOS-depends-build.patch
@@ -1,7 +1,7 @@
-From 9b051041e568ccb3a509a7453aff6ca44fb1c045 Mon Sep 17 00:00:00 2001
+From dcb483e5cb97c4e3c500355d8225bd49d3e0ae7f Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 21 Nov 2024 06:05:03 -0500
-Subject: [PATCH] fix iOS depends build
+Subject: [PATCH 13/14] fix iOS depends build
---
CMakeLists.txt | 4 ----
@@ -11,7 +11,7 @@ Subject: [PATCH] fix iOS depends build
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1397bb217..b9207ef2a 100644
+index b995a68..4e86328 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,10 +39,6 @@ include(CheckLibraryExists)
@@ -26,7 +26,7 @@ index 1397bb217..b9207ef2a 100644
message(STATUS "CMake version ${CMAKE_VERSION}")
diff --git a/src/checkpoints/CMakeLists.txt b/src/checkpoints/CMakeLists.txt
-index 665441f62..841df3256 100644
+index 665441f..841df32 100644
--- a/src/checkpoints/CMakeLists.txt
+++ b/src/checkpoints/CMakeLists.txt
@@ -28,7 +28,11 @@
@@ -43,7 +43,7 @@ index 665441f62..841df3256 100644
find_library(IOKIT_LIBRARY IOKit)
mark_as_advanced(IOKIT_LIBRARY)
diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt
-index 414936a05..81c81767f 100644
+index 414936a..81c8176 100644
--- a/src/cryptonote_basic/CMakeLists.txt
+++ b/src/cryptonote_basic/CMakeLists.txt
@@ -28,7 +28,11 @@
@@ -60,7 +60,7 @@ index 414936a05..81c81767f 100644
find_library(IOKIT_LIBRARY IOKit)
mark_as_advanced(IOKIT_LIBRARY)
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp
-index 83bea8b5b..dfb4b5c5a 100644
+index 71b8f78..0f53f02 100644
--- a/src/cryptonote_basic/miner.cpp
+++ b/src/cryptonote_basic/miner.cpp
@@ -45,7 +45,7 @@
@@ -72,7 +72,7 @@ index 83bea8b5b..dfb4b5c5a 100644
#include <sys/times.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/ps/IOPSKeys.h>
-@@ -971,7 +971,7 @@ namespace cryptonote
+@@ -883,7 +883,7 @@ namespace cryptonote
return true;
@@ -81,7 +81,7 @@ index 83bea8b5b..dfb4b5c5a 100644
mach_msg_type_number_t count;
kern_return_t status;
-@@ -1037,7 +1037,7 @@ namespace cryptonote
+@@ -949,7 +949,7 @@ namespace cryptonote
return true;
}
@@ -90,7 +90,7 @@ index 83bea8b5b..dfb4b5c5a 100644
struct tms tms;
if ( times(&tms) != (clock_t)-1 )
-@@ -1066,7 +1066,7 @@ namespace cryptonote
+@@ -978,7 +978,7 @@ namespace cryptonote
return boost::logic::tribool(power_status.ACLineStatus != 1);
}
diff --git a/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch b/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch
index 666e64d..4cd1d0c 100644
--- a/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch
+++ b/patches/monero/0014-include-locale-only-when-targeting-WIN32.patch
@@ -1,7 +1,7 @@
-From c66deda1792f4955e4175b4e47af54bd2a7d7b24 Mon Sep 17 00:00:00 2001
+From dfe8fde34cd51f5d5ec95fb464737f6e447d41bb Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 18 Nov 2024 10:57:37 -0500
-Subject: [PATCH] include locale only when targeting WIN32
+Subject: [PATCH 14/14] include locale only when targeting WIN32
---
CMakeLists.txt | 5 ++++-
@@ -9,10 +9,10 @@ Subject: [PATCH] include locale only when targeting WIN32
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b995a68..0d0a0e3 100644
+index 4e86328..809bce6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1083,7 +1083,10 @@ if(STATIC)
+@@ -1079,7 +1079,10 @@ if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
@@ -25,7 +25,7 @@ index b995a68..0d0a0e3 100644
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 17d1625..995c45c 100644
+index 5734aff..f4fb093 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -46,7 +46,9 @@
@@ -37,7 +37,7 @@ index 17d1625..995c45c 100644
+#endif
#include <boost/filesystem.hpp>
#include "bc-ur/src/bc-ur.hpp"
- #ifdef HIDAPI_DUMMY
+ #if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
--
2.39.5 (Apple Git-154)
diff --git a/patches/monero/0015-ledger-dummy-fix.patch b/patches/monero/0015-ledger-dummy-fix.patch
deleted file mode 100644
index e8654b9..0000000
--- a/patches/monero/0015-ledger-dummy-fix.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From ebb4f7509127d1d442732da92aa96a1718b57698 Mon Sep 17 00:00:00 2001
-From: cyan <cyjan@mrcyjanek.net>
-Date: Tue, 26 Nov 2024 00:31:15 +0000
-Subject: [PATCH] ledger dummy fix
-
----
- src/device/device_io_dummy.cpp | 2 +-
- src/device/device_io_dummy.hpp | 2 +-
- src/device/device_ledger.hpp | 2 +-
- src/wallet/api/wallet.cpp | 36 +++++++++++++++++-----------------
- 4 files changed, 21 insertions(+), 21 deletions(-)
-
-diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
-index 9fe4040a7..edb4beea3 100644
---- a/src/device/device_io_dummy.cpp
-+++ b/src/device/device_io_dummy.cpp
-@@ -38,7 +38,7 @@
- // Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
- // own USB/BLE/other transport layer.
-
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
- #include <boost/scope_exit.hpp>
- #include "log.hpp"
- #include "device_io_dummy.hpp"
-diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
-index a1733616d..4a4807121 100644
---- a/src/device/device_io_dummy.hpp
-+++ b/src/device/device_io_dummy.hpp
-@@ -26,7 +26,7 @@
- // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- //
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
-
- #pragma once
-
-diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 506f27c4a..39454ca6d 100644
---- a/src/device/device_ledger.hpp
-+++ b/src/device/device_ledger.hpp
-@@ -149,7 +149,7 @@ namespace hw {
- mutable boost::mutex command_locker;
-
- //IO
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
- hw::io::device_io_dummy hw_device;
- #else
- hw::io::device_io_hid hw_device;
-diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 995c45c1d..1cfeea619 100644
---- a/src/wallet/api/wallet.cpp
-+++ b/src/wallet/api/wallet.cpp
-@@ -3339,8 +3339,8 @@ uint64_t WalletImpl::getBytesSent()
-
- // HIDAPI_DUMMY
- bool WalletImpl::getStateIsConnected() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::stateIsConnected;
-@@ -3348,8 +3348,8 @@ bool WalletImpl::getStateIsConnected() {
- }
-
- unsigned char* WalletImpl::getSendToDevice() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return {};
- #else
- return hw::io::device_io_dummy::sendToDevice;
-@@ -3357,8 +3357,8 @@ unsigned char* WalletImpl::getSendToDevice() {
- }
-
- size_t WalletImpl::getSendToDeviceLength() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return -1;
- #else
- return hw::io::device_io_dummy::sendToDeviceLength;
-@@ -3366,8 +3366,8 @@ size_t WalletImpl::getSendToDeviceLength() {
- }
-
- unsigned char* WalletImpl::getReceivedFromDevice() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return {};
- #else
- return hw::io::device_io_dummy::receivedFromDevice;
-@@ -3375,8 +3375,8 @@ unsigned char* WalletImpl::getReceivedFromDevice() {
- }
-
- size_t WalletImpl::getReceivedFromDeviceLength() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return -1;
- #else
- return hw::io::device_io_dummy::receivedFromDeviceLength;
-@@ -3384,8 +3384,8 @@ size_t WalletImpl::getReceivedFromDeviceLength() {
- }
-
- bool WalletImpl::getWaitsForDeviceSend() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::receivedFromDeviceLength;
-@@ -3393,8 +3393,8 @@ bool WalletImpl::getWaitsForDeviceSend() {
- }
-
- bool WalletImpl::getWaitsForDeviceReceive() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::waitsForDeviceReceive;
-@@ -3402,8 +3402,8 @@ bool WalletImpl::getWaitsForDeviceReceive() {
- }
-
- void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return;
- #else
- hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
-@@ -3415,8 +3415,8 @@ void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
- }
-
- void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return;
- #else
- hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
---
-2.43.0
-
diff --git a/patches/monero/0020-catch-exception-in-queryWalletDevice.patch b/patches/monero/0020-catch-exception-in-queryWalletDevice.patch
deleted file mode 100644
index 1fb2471..0000000
--- a/patches/monero/0020-catch-exception-in-queryWalletDevice.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d0774a747e7520f6dae3cf90ecbb682395da8c9c Mon Sep 17 00:00:00 2001
-From: cyan <cyjan@mrcyjanek.net>
-Date: Wed, 27 Nov 2024 23:28:32 +0000
-Subject: [PATCH] catch exception in queryWalletDevice
-
----
- src/wallet/api/wallet_manager.cpp | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index f88bd9e64..c200f52ae 100644
---- a/src/wallet/api/wallet_manager.cpp
-+++ b/src/wallet/api/wallet_manager.cpp
-@@ -213,10 +213,14 @@ bool WalletManagerImpl::verifyWalletPassword(const std::string &keys_file_name,
-
- bool WalletManagerImpl::queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds) const
- {
-- hw::device::device_type type;
-- bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
-- device_type = static_cast<Wallet::Device>(type);
-- return r;
-+ try {
-+ hw::device::device_type type;
-+ bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
-+ device_type = static_cast<Wallet::Device>(type);
-+ return r;
-+ } catch (...) {
-+ return false;
-+ }
- }
-
- std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
---
-2.43.0
-
diff --git a/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch b/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch
index d41e362..df672bd 100644
--- a/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch
+++ b/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch
@@ -1,7 +1,7 @@
-From a722b7a7ca6b887ad56650ac2b331088547b221c Mon Sep 17 00:00:00 2001
+From 82bdb3dcf75f9e6bd8c5e31a125b8acc154a0623 Mon Sep 17 00:00:00 2001
From: j-berman <justinberman@protonmail.com>
Date: Thu, 13 Oct 2022 18:33:33 -0700
-Subject: [PATCH 01/17] wallet: background sync with just the view key
+Subject: [PATCH 01/15] wallet: background sync with just the view key
- When background syncing, the wallet wipes the spend key
from memory and processes all new transactions. The wallet saves
diff --git a/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
index 8bd89c4..d922a40 100644
--- a/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
+++ b/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
@@ -1,7 +1,7 @@
-From 36f3c8e3a69c2cca71ce7fcc9a5095e9153170ce Mon Sep 17 00:00:00 2001
+From 21e95275c2e40454d9cce05c1139d8139af16587 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 23 Oct 2024 15:18:21 +0200
-Subject: [PATCH 02/17] fix missing ___clear_cache when targetting iOS
+Subject: [PATCH 02/15] fix missing ___clear_cache when targetting iOS
---
external/randomwow | 2 +-
diff --git a/patches/wownero/0003-fix-is_trivially_copyable.patch b/patches/wownero/0003-fix-is_trivially_copyable.patch
index 553af86..f600003 100644
--- a/patches/wownero/0003-fix-is_trivially_copyable.patch
+++ b/patches/wownero/0003-fix-is_trivially_copyable.patch
@@ -1,7 +1,7 @@
-From 8c4d673da3adc9c97962e09dc62ce29de73be829 Mon Sep 17 00:00:00 2001
+From b41551e7dd8d3f4968f330f60d14773eaabca818 Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Tue, 22 Oct 2024 10:23:18 +0000
-Subject: [PATCH 03/17] fix is_trivially_copyable
+Subject: [PATCH 03/15] fix is_trivially_copyable
---
contrib/epee/include/span.h | 2 --
diff --git a/patches/wownero/0004-store-crash-fix.patch b/patches/wownero/0004-store-crash-fix.patch
index 739c67f..0f15183 100644
--- a/patches/wownero/0004-store-crash-fix.patch
+++ b/patches/wownero/0004-store-crash-fix.patch
@@ -1,7 +1,7 @@
-From fb3c06a713325f63bc090c5e09e46a63bdaa8c2d Mon Sep 17 00:00:00 2001
+From 9dc9c8048d3918fe3615e91ab8be342471167c26 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Sat, 11 May 2024 16:25:10 +0200
-Subject: [PATCH 04/17] store crash fix
+Subject: [PATCH 04/15] store crash fix
Monero wallet crashes (sometimes) when it is syncing,
while the proper solution (that can be seen in feather)
diff --git a/patches/wownero/0005-Update-android-ndk.patch b/patches/wownero/0005-Update-android-ndk.patch
deleted file mode 100644
index 8a781b6..0000000
--- a/patches/wownero/0005-Update-android-ndk.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 05d9d0ca610daab96634ffaddafeeb7ff931148c Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Thu, 23 May 2024 08:02:49 +0200
-Subject: [PATCH 05/17] Update android ndk
-
-rename arm -> armv7a
----
- contrib/depends/hosts/android.mk | 18 ++++++++++++----
- contrib/depends/packages/android_ndk.mk | 28 ++++++++++++++++++-------
- contrib/depends/packages/boost.mk | 1 +
- contrib/depends/packages/openssl.mk | 2 +-
- contrib/depends/toolchain.cmake.in | 13 ++++++------
- 5 files changed, 44 insertions(+), 18 deletions(-)
-
-diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk
-index d6f8b99dd..827103c36 100644
---- a/contrib/depends/hosts/android.mk
-+++ b/contrib/depends/hosts/android.mk
-@@ -1,12 +1,22 @@
- ANDROID_API=21
--
--ifeq ($(host_arch),arm)
--host_toolchain=arm-linux-androideabi-
-+host_toolchain=nonexistent
-+ifeq ($(host_arch),armv7a)
-+host_toolchain=armv7a-linux-androideabi${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),x86_64)
-+host_toolchain=x86_64-linux-android${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),i686)
-+host_toolchain=i686-linux-android${ANDROID_API}-
-+endif
-+ifeq ($(host_arch),aarch64)
-+host_toolchain=aarch64-linux-android${ANDROID_API}-
- endif
-
- android_CC=$(host_toolchain)clang
- android_CXX=$(host_toolchain)clang++
--android_RANLIB=:
-+android_RANLIB=llvm-ranlib
-+android_AR=llvm-ar
-
- android_CFLAGS=-pipe
- android_CXXFLAGS=$(android_CFLAGS)
-diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk
-index 9b8a5332f..2c2914ec2 100644
---- a/contrib/depends/packages/android_ndk.mk
-+++ b/contrib/depends/packages/android_ndk.mk
-@@ -1,12 +1,16 @@
- package=android_ndk
--$(package)_version=17b
-+$(package)_version=26d
- $(package)_download_path=https://dl.google.com/android/repository/
--$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
--$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
-+$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip
-+$(package)_sha256_hash=eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54
-+
-+$(package)_version_apiversion=21
-
- define $(package)_set_vars
--$(package)_config_opts_arm=--arch arm
-+$(package)_config_opts_armv7a=--arch arm
- $(package)_config_opts_aarch64=--arch arm64
-+$(package)_config_opts_x86_64=--arch x86_64
-+$(package)_config_opts_i686=--arch x86
- endef
-
- define $(package)_extract_cmds
-@@ -14,9 +18,19 @@ define $(package)_extract_cmds
- unzip -q $($(1)_source_dir)/$($(package)_file_name)
- endef
-
-+# arm-linux-androideabi-ar - openssl workaround
-+
- define $(package)_stage_cmds
-- android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
-- --install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
-- mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
-+ mkdir -p $(build_prefix) &&\
-+ echo $(build_prefix)/toolchain && \
-+ android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api $($(package)_version_apiversion) \
-+ --install-dir $(build_prefix)/toolchain --stl=libc++ $($(package)_config_opts) &&\
-+ mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native && \
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ranlib &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ranlib &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ar &&\
-+ cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ranlib
- endef
-
-diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
-index fd06c5393..c17e863cc 100644
---- a/contrib/depends/packages/boost.mk
-+++ b/contrib/depends/packages/boost.mk
-@@ -25,6 +25,7 @@ $(package)_archiver_darwin=$($(package)_libtool)
- $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
- $(package)_cxxflags=-std=c++11
- $(package)_cxxflags_linux=-fPIC
-+$(package)_cxxflags_android=-fPIC
- $(package)_cxxflags_freebsd=-fPIC
- endef
-
-diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk
-index a157762c7..2430f6495 100644
---- a/contrib/depends/packages/openssl.mk
-+++ b/contrib/depends/packages/openssl.mk
-@@ -34,7 +34,7 @@ $(package)_config_opts_x86_64_linux=linux-x86_64
- $(package)_config_opts_i686_linux=linux-generic32
- $(package)_config_opts_arm_linux=linux-generic32
- $(package)_config_opts_aarch64_linux=linux-generic64
--$(package)_config_opts_arm_android=--static android-arm
-+$(package)_config_opts_armv7a_android=--static android-arm
- $(package)_config_opts_aarch64_android=--static android-arm64
- $(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
- $(package)_config_opts_riscv64_linux=linux-generic64
-diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
-index f118c754e..cc1d9b5c5 100644
---- a/contrib/depends/toolchain.cmake.in
-+++ b/contrib/depends/toolchain.cmake.in
-@@ -100,20 +100,21 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- SET(LLVM_ENABLE_PIE OFF)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
- SET(ANDROID TRUE)
-- if(ARCHITECTURE STREQUAL "arm")
-+ if(ARCHITECTURE STREQUAL "armv7a")
- SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
- SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
- SET(CMAKE_ANDROID_ARM_MODE ON)
-- SET(CMAKE_C_COMPILER_TARGET arm-linux-androideabi)
-- SET(CMAKE_CXX_COMPILER_TARGET arm-linux-androideabi)
-- SET(_CMAKE_TOOLCHAIN_PREFIX arm-linux-androideabi-)
-+ SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21)
-+ SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21)
-+ SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-)
- elseif(ARCHITECTURE STREQUAL "aarch64")
- SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
- SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
- endif()
- SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native)
-- SET(CMAKE_C_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang")
-- SET(CMAKE_CXX_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang++")
-+ SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
-+ SET(CMAKE_C_COMPILER @CC@)
-+ SET(CMAKE_CXX_COMPILER @CXX@)
- else()
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_CXX_COMPILER @CXX@)
---
-2.39.5 (Apple Git-154)
-
diff --git a/patches/monero/0005-uint64_t-missing-definition-fix.patch b/patches/wownero/0005-uint64_t-missing-definition-fix.patch
index e2d7810..05bef1f 100644
--- a/patches/monero/0005-uint64_t-missing-definition-fix.patch
+++ b/patches/wownero/0005-uint64_t-missing-definition-fix.patch
@@ -1,7 +1,7 @@
-From fc8b72e4da39cfe847a75213aab70365f3c2140d Mon Sep 17 00:00:00 2001
+From 223e2e4b5b2c6366d0dd4130a726c4cfcdb13ffb Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 2 Sep 2024 16:40:31 +0200
-Subject: [PATCH 05/12] uint64_t missing definition fix
+Subject: [PATCH 05/15] uint64_t missing definition fix
---
contrib/epee/include/net/http_base.h | 2 +-
@@ -21,5 +21,5 @@ index 4af4da790..ae4c0d05e 100644
#include <string>
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0006-use-proper-error-handling-in-get_seed.patch b/patches/wownero/0006-use-proper-error-handling-in-get_seed.patch
index 5039c22..8f10b80 100644
--- a/patches/monero/0006-use-proper-error-handling-in-get_seed.patch
+++ b/patches/wownero/0006-use-proper-error-handling-in-get_seed.patch
@@ -1,7 +1,7 @@
-From 8ccefc307c8025881128a3ca908975270219d92e Mon Sep 17 00:00:00 2001
+From 776d22d6dc47739074f004979894f3c62d43a0c9 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 24 Jun 2024 10:49:12 +0200
-Subject: [PATCH 06/12] use proper error handling in get_seed
+Subject: [PATCH 06/15] use proper error handling in get_seed
---
src/wallet/api/wallet.cpp | 17 ++++++++++++-----
@@ -9,7 +9,7 @@ Subject: [PATCH 06/12] 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 0d85cf359..dfbf4fd28 100644
+index 899ef044a..e16d8f83f 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -826,12 +826,19 @@ bool WalletImpl::close(bool store)
@@ -38,7 +38,7 @@ index 0d85cf359..dfbf4fd28 100644
std::string WalletImpl::getSeedLanguage() const
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index aa61fb298..5ffeda2ec 100644
+index 651161d14..1e527cf97 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1440,11 +1440,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
@@ -67,5 +67,5 @@ index aa61fb298..5ffeda2ec 100644
return true;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0007-UR-functions.patch b/patches/wownero/0007-UR-functions.patch
index b321420..ad0592c 100644
--- a/patches/monero/0007-UR-functions.patch
+++ b/patches/wownero/0007-UR-functions.patch
@@ -1,7 +1,7 @@
-From 06921411d75e372df8176dd307e146812fe397ba Mon Sep 17 00:00:00 2001
+From 1302c64b0218da6d32b9dd9cbf1c2c56f51e6aff Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 10:09:50 +0100
-Subject: [PATCH 07/12] UR functions
+Subject: [PATCH 07/15] UR functions
This commit adds UR functions for UR tasks,
I believe that the right place to get
@@ -19,7 +19,7 @@ Things broken in the commit
later. However (considering the purpose
of this patch) it is not a dealbreaker.
---
- .gitmodules | 4 +
+ .gitmodules | 5 +-
CMakeLists.txt | 4 +-
contrib/depends/hosts/darwin.mk | 2 +-
contrib/depends/toolchain.cmake.in | 2 +-
@@ -36,23 +36,24 @@ Things broken in the commit
src/wallet/api/wallet2_api.h | 22 +-
src/wallet/wallet2.cpp | 141 +++++++----
src/wallet/wallet2.h | 3 +
- 17 files changed, 521 insertions(+), 59 deletions(-)
+ 17 files changed, 521 insertions(+), 60 deletions(-)
create mode 160000 external/bc-ur
diff --git a/.gitmodules b/.gitmodules
-index ffb73fe9a..72af74d55 100644
+index 991071fbe..b24855d9b 100644
--- a/.gitmodules
+++ b/.gitmodules
-@@ -15,3 +15,7 @@
- path = external/supercop
- url = https://github.com/monero-project/supercop
- branch = monero
+@@ -16,4 +16,7 @@
+ path = external/randomwow
+ url = https://codeberg.org/wownero/RandomWOW
+ branch = 1.2.1-wow
+-
+[submodule "external/bc-ur"]
+ path = external/bc-ur
+ url = https://github.com/MrCyjaneK/bc-ur
+ branch = misc
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8fb03ba1f..63ee8252d 100644
+index e387ffb1b..8b81c7ab7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,8 @@ enable_language(C ASM)
@@ -65,14 +66,14 @@ index 8fb03ba1f..63ee8252d 100644
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
-@@ -364,6 +365,7 @@ if(NOT MANUAL_SUBMODULES)
+@@ -365,6 +366,7 @@ if(NOT MANUAL_SUBMODULES)
endfunction ()
message(STATUS "Checking submodules")
-+# check_submodule(external/bc-ur)
++ #check_submodule(external/bc-ur)
check_submodule(external/miniupnp)
check_submodule(external/rapidjson)
- check_submodule(external/trezor-common)
+ #check_submodule(external/trezor-common)
diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
index 79d449054..83d83036b 100644
--- a/contrib/depends/hosts/darwin.mk
@@ -84,7 +85,7 @@ index 79d449054..83d83036b 100644
ifeq (aarch64, $(host_arch))
CC_target=arm64-apple-$(host_os)
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
-index cc1d9b5c5..48a6f947e 100644
+index f118c754e..f26655d68 100644
--- a/contrib/depends/toolchain.cmake.in
+++ b/contrib/depends/toolchain.cmake.in
@@ -94,7 +94,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -97,15 +98,15 @@ index cc1d9b5c5..48a6f947e 100644
SET(LLVM_ENABLE_PIC OFF)
SET(LLVM_ENABLE_PIE OFF)
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index 5b7f69a56..f9ed6a69a 100644
+index 3184ae5a1..88a7bb0b5 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
-@@ -69,4 +69,5 @@ endif()
+@@ -72,4 +72,5 @@ endif()
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
+add_subdirectory(bc-ur)
- add_subdirectory(randomx EXCLUDE_FROM_ALL)
+ add_subdirectory(randomwow EXCLUDE_FROM_ALL)
diff --git a/external/bc-ur b/external/bc-ur
new file mode 160000
index 000000000..d82e7c753
@@ -114,7 +115,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 9961d13e7..8403d76e8 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -313,12 +313,13 @@ namespace hw {
@@ -134,7 +135,7 @@ index 5d0afe1ee..bb5b6f497 100644
boost::lock_guard<boost::recursive_mutex> lock1(device_locker, boost::adopt_lock); \
boost::lock_guard<boost::mutex> lock2(command_locker, boost::adopt_lock)
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
-index 6095f99d5..b163212b7 100644
+index fdf3f2f5d..66384fe31 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -50,6 +50,7 @@ monero_add_library(wallet
@@ -281,7 +282,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 dfbf4fd28..4fb5f7595 100644
+index e16d8f83f..ee000e7ab 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -47,6 +47,7 @@
@@ -779,7 +780,7 @@ 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 5ffeda2ec..4f58d7aea 100644
+index 1e527cf97..671fa5298 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)
@@ -799,7 +800,7 @@ index 5ffeda2ec..4f58d7aea 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);
-@@ -6987,6 +6997,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
+@@ -6989,6 +6999,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
return amount;
}
//----------------------------------------------------------------------------------------------------
@@ -825,7 +826,7 @@ index 5ffeda2ec..4f58d7aea 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;
-@@ -7838,9 +7867,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
+@@ -7840,9 +7869,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;
@@ -836,7 +837,7 @@ index 5ffeda2ec..4f58d7aea 100644
std::vector<crypto::public_key> additional_tx_pub_keys;
for (const crypto::secret_key &skey: txs[n].additional_tx_keys)
{
-@@ -11236,7 +11263,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11232,7 +11259,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;
}
@@ -845,7 +846,7 @@ index 5ffeda2ec..4f58d7aea 100644
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
{
-@@ -11286,9 +11313,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11282,9 +11309,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");
@@ -863,7 +864,7 @@ index 5ffeda2ec..4f58d7aea 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({});
-@@ -13924,33 +13957,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
+@@ -13911,33 +13944,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
{
@@ -927,7 +928,7 @@ index 5ffeda2ec..4f58d7aea 100644
//----------------------------------------------------------------------------------------------------
std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> wallet2::export_key_images(bool all) const
{
-@@ -14005,53 +14045,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
+@@ -13992,53 +14032,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
return std::make_pair(offset, ski);
}
@@ -1007,7 +1008,7 @@ index 5ffeda2ec..4f58d7aea 100644
ski.push_back(std::make_pair(key_image, signature));
}
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index a050286bc..1d7e430b9 100644
+index c07a47c11..80ff0698d 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1150,6 +1150,7 @@ private:
@@ -1031,5 +1032,5 @@ index a050286bc..1d7e430b9 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.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0008-add-dummy-device-for-ledger.patch b/patches/wownero/0008-add-dummy-device-for-ledger.patch
index 68e072e..6d40bb2 100644
--- a/patches/monero/0008-add-dummy-device-for-ledger.patch
+++ b/patches/wownero/0008-add-dummy-device-for-ledger.patch
@@ -1,29 +1,30 @@
-From 30ee30d8f0d5e9c301b782db53c92a8982c5bb46 Mon Sep 17 00:00:00 2001
+From 07a3019d94feb48f746dbc780db1e4d2e0d6080c Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 26 Jun 2024 15:04:38 +0200
-Subject: [PATCH 08/12] add dummy device for ledger
+Subject: [PATCH 08/15] add dummy device for ledger
---
- CMakeLists.txt | 6 +-
- src/device/CMakeLists.txt | 6 +-
- src/device/device.cpp | 10 ++-
- src/device/device.hpp | 12 +--
- src/device/device_io_dummy.cpp | 133 +++++++++++++++++++++++++++++++++
- src/device/device_io_dummy.hpp | 74 ++++++++++++++++++
- src/device/device_ledger.cpp | 6 +-
- src/device/device_ledger.hpp | 7 +-
- src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++++
- src/wallet/api/wallet.h | 18 +++++
- src/wallet/api/wallet2_api.h | 12 +++
- 11 files changed, 357 insertions(+), 21 deletions(-)
+ CMakeLists.txt | 6 +-
+ src/device/CMakeLists.txt | 6 +-
+ src/device/device.cpp | 10 ++-
+ src/device/device.hpp | 12 +--
+ src/device/device_io_dummy.cpp | 133 ++++++++++++++++++++++++++++++
+ src/device/device_io_dummy.hpp | 74 +++++++++++++++++
+ src/device/device_ledger.cpp | 6 +-
+ src/device/device_ledger.hpp | 7 +-
+ src/wallet/api/wallet.cpp | 94 +++++++++++++++++++++
+ src/wallet/api/wallet.h | 18 ++++
+ src/wallet/api/wallet2_api.h | 12 +++
+ src/wallet/api/wallet_manager.cpp | 12 ++-
+ 12 files changed, 365 insertions(+), 25 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 63ee8252d..43ef6cd20 100644
+index 8b81c7ab7..abe44eca5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -692,8 +692,12 @@ include_directories(${LMDB_INCLUDE})
+@@ -709,8 +709,12 @@ include_directories(${LMDB_INCLUDE})
include_directories(${LIBUNWIND_INCLUDE})
link_directories(${LIBUNWIND_LIBRARY_DIRS})
@@ -68,7 +69,7 @@ index e4f1159b5..14d398f87 100644
${device_headers}
device_ledger.hpp
diff --git a/src/device/device.cpp b/src/device/device.cpp
-index e6cd358b6..636929feb 100644
+index e6cd358b6..777584c01 100644
--- a/src/device/device.cpp
+++ b/src/device/device.cpp
@@ -29,7 +29,7 @@
@@ -130,7 +131,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..fb082694e
+index 000000000..edb4beea3
--- /dev/null
+++ b/src/device/device_io_dummy.cpp
@@ -0,0 +1,133 @@
@@ -174,7 +175,7 @@ index 000000000..fb082694e
+// Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
+// own USB/BLE/other transport layer.
+
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include <boost/scope_exit.hpp>
+#include "log.hpp"
+#include "device_io_dummy.hpp"
@@ -349,7 +350,7 @@ index 000000000..a1733616d
+
+#endif // HAVE_HIDAPI
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index bb5b6f497..d405b86f2 100644
+index 8403d76e8..0587eb7d3 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -41,7 +41,7 @@ namespace hw {
@@ -374,14 +375,14 @@ index bb5b6f497..d405b86f2 100644
bool device_ledger::connect(void) {
this->disconnect();
-+ #ifndef HIDAPI_DUMMY
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
hw_device.connect(known_devices);
+ #endif
this->reset();
#ifdef DEBUG_HWDEVICE
cryptonote::account_public_address pubkey;
diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 03058c4f1..506f27c4a 100644
+index 03058c4f1..39454ca6d 100644
--- a/src/device/device_ledger.hpp
+++ b/src/device/device_ledger.hpp
@@ -35,6 +35,7 @@
@@ -405,7 +406,7 @@ index 03058c4f1..506f27c4a 100644
mutable boost::mutex command_locker;
//IO
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+ hw::io::device_io_dummy hw_device;
+#else
hw::io::device_io_hid hw_device;
@@ -414,14 +415,14 @@ index 03058c4f1..506f27c4a 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 4fb5f7595..4a3a7be75 100644
+index ee000e7ab..556e2a8ce 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -48,6 +48,9 @@
#include <boost/locale.hpp>
#include <boost/filesystem.hpp>
#include "bc-ur/src/bc-ur.hpp"
-+#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include "device/device_io_dummy.hpp"
+#endif
@@ -434,8 +435,8 @@ index 4fb5f7595..4a3a7be75 100644
+
+// HIDAPI_DUMMY
+bool WalletImpl::getStateIsConnected() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::stateIsConnected;
@@ -443,8 +444,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+unsigned char* WalletImpl::getSendToDevice() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::sendToDevice;
@@ -452,8 +453,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+size_t WalletImpl::getSendToDeviceLength() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::sendToDeviceLength;
@@ -461,8 +462,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+unsigned char* WalletImpl::getReceivedFromDevice() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::receivedFromDevice;
@@ -470,8 +471,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+size_t WalletImpl::getReceivedFromDeviceLength() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
@@ -479,8 +480,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+bool WalletImpl::getWaitsForDeviceSend() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
@@ -488,8 +489,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+bool WalletImpl::getWaitsForDeviceReceive() {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::waitsForDeviceReceive;
@@ -497,8 +498,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
@@ -510,8 +511,8 @@ index 4fb5f7595..4a3a7be75 100644
+}
+
+void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
-+ #ifndef HIDAPI_DUMMY
-+ setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
@@ -575,6 +576,29 @@ index 764adbfbf..53ec4abfc 100644
};
/**
+diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
+index e81b8f83a..277be6ac9 100644
+--- a/src/wallet/api/wallet_manager.cpp
++++ b/src/wallet/api/wallet_manager.cpp
+@@ -188,10 +188,14 @@ bool WalletManagerImpl::verifyWalletPassword(const std::string &keys_file_name,
+
+ bool WalletManagerImpl::queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds) const
+ {
+- hw::device::device_type type;
+- bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
+- device_type = static_cast<Wallet::Device>(type);
+- return r;
++ try {
++ hw::device::device_type type;
++ bool r = tools::wallet2::query_device(type, keys_file_name, password, kdf_rounds);
++ device_type = static_cast<Wallet::Device>(type);
++ return r;
++ } catch (...) {
++ return false;
++ }
+ }
+
+ std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0009-polyseed.patch b/patches/wownero/0009-polyseed.patch
index 4d82940..aa5af28 100644
--- a/patches/monero/0009-polyseed.patch
+++ b/patches/wownero/0009-polyseed.patch
@@ -1,7 +1,7 @@
-From 6b0951540be868373ed261fa9b2806bf7888c9f0 Mon Sep 17 00:00:00 2001
+From c1f5cc2d9b71b7b923b17c33c23b23da918e4751 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 09:42:37 +0100
-Subject: [PATCH 09/12] polyseed
+Subject: [PATCH 09/15] polyseed
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
---
@@ -34,9 +34,9 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
src/wallet/api/wallet2_api.h | 25 +++
src/wallet/api/wallet_manager.cpp | 9 +
src/wallet/api/wallet_manager.h | 10 +
- src/wallet/wallet2.cpp | 100 ++++++++--
+ src/wallet/wallet2.cpp | 99 ++++++++--
src/wallet/wallet2.h | 30 ++-
- 31 files changed, 912 insertions(+), 24 deletions(-)
+ 31 files changed, 912 insertions(+), 23 deletions(-)
create mode 100644 contrib/depends/packages/polyseed.mk
create mode 100644 contrib/depends/patches/polyseed/0001-disable-soname.patch
create mode 100644 contrib/depends/patches/polyseed/force-static-mingw.patch
@@ -49,36 +49,34 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
create mode 100644 src/polyseed/polyseed.hpp
diff --git a/.gitmodules b/.gitmodules
-index 72af74d55..b838e84e0 100644
+index b24855d9b..589676649 100644
--- a/.gitmodules
+++ b/.gitmodules
-@@ -11,6 +11,12 @@
- path = external/randomx
- url = https://github.com/MrCyjaneK/RandomX
- branch = cyjan-fix-ios
+@@ -20,3 +20,9 @@
+ path = external/bc-ur
+ url = https://github.com/MrCyjaneK/bc-ur
+ branch = misc
+[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/supercop"]
- path = external/supercop
- url = https://github.com/monero-project/supercop
+\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 43ef6cd20..e7fa90abb 100644
+index abe44eca5..85a62ef7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -371,6 +371,8 @@ if(NOT MANUAL_SUBMODULES)
- check_submodule(external/trezor-common)
- check_submodule(external/randomx)
+@@ -372,6 +372,8 @@ if(NOT MANUAL_SUBMODULES)
+ #check_submodule(external/trezor-common)
+ check_submodule(external/randomwow)
check_submodule(external/supercop)
+ check_submodule(external/polyseed)
+ check_submodule(external/utf8proc)
endif()
endif()
-@@ -460,7 +462,7 @@ endif()
+@@ -461,7 +463,7 @@ endif()
# elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
# set(BSDI TRUE)
@@ -309,20 +307,19 @@ index b016f2f48..f2f365b1b 100644
+
}
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index f9ed6a69a..8fcf792d7 100644
+index 88a7bb0b5..95be500b1 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
-@@ -69,5 +69,7 @@ endif()
- add_subdirectory(db_drivers)
+@@ -73,4 +73,6 @@ add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
+ add_subdirectory(bc-ur)
+add_subdirectory(polyseed EXCLUDE_FROM_ALL)
+add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
- add_subdirectory(bc-ur)
- add_subdirectory(randomx EXCLUDE_FROM_ALL)
+ add_subdirectory(randomwow EXCLUDE_FROM_ALL)
diff --git a/external/polyseed b/external/polyseed
new file mode 160000
-index 000000000..dfb05d8ed
+index 000000000..bd79f5014
--- /dev/null
+++ b/external/polyseed
@@ -0,0 +1 @@
@@ -335,7 +332,7 @@ index 000000000..3de4596fb
@@ -0,0 +1 @@
+Subproject commit 3de4596fbe28956855df2ecb3c11c0bbc3535838
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 3335d3c21..06b708cf0 100644
+index 9216bcaa5..c043ba150 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -95,6 +95,7 @@ add_subdirectory(net)
@@ -450,14 +447,14 @@ index 93d1d28f0..1f76febce 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 f9e6a6cb9..3af3a63a1 100644
+index 8b5091a46..d9151e8d2 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
-@@ -207,6 +207,8 @@
+@@ -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.
@@ -1001,7 +998,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 ec79482ac..e74fa0884 100644
+index 556e2a8ce..704e5e148 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
@@ -1156,7 +1153,7 @@ index 53ec4abfc..be1c3704e 100644
* \brief Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted
* \param wallet previously opened / created wallet instance
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index e81b8f83a..c79fe25d6 100644
+index 277be6ac9..da2056d8a 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -156,6 +156,15 @@ Wallet *WalletManagerImpl::createWalletFromDevice(const std::string &path,
@@ -1197,7 +1194,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 4f58d7aea..1b3a66279 100644
+index 671fa5298..3e49c21f8 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -92,6 +92,7 @@ using namespace epee;
@@ -1212,8 +1209,8 @@ index 4f58d7aea..1b3a66279 100644
m_enable_multisig(false),
m_pool_info_query_time(0),
m_has_ever_refreshed_from_node(false),
-- m_allow_mismatched_daemon_version(false)
-+ m_allow_mismatched_daemon_version(false),
+- m_allow_mismatched_daemon_version(true)
++ m_allow_mismatched_daemon_version(true),
+ m_polyseed(false)
{
set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
@@ -1239,7 +1236,7 @@ index 4f58d7aea..1b3a66279 100644
bool wallet2::get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase) const
{
bool ready;
-@@ -4790,6 +4806,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
+@@ -4792,6 +4808,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());
@@ -1249,15 +1246,15 @@ index 4f58d7aea..1b3a66279 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());
-@@ -5029,6 +5048,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5031,6 +5050,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_allow_mismatched_daemon_version = true;
m_custom_background_key = boost::none;
+ m_polyseed = false;
}
else if(json.IsObject())
{
-@@ -5269,6 +5289,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5271,6 +5291,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;
@@ -1267,7 +1264,7 @@ index 4f58d7aea..1b3a66279 100644
// Load encryption key used to encrypt background cache
crypto::chacha_key custom_background_key;
m_custom_background_key = boost::none;
-@@ -5588,6 +5611,48 @@ void wallet2::init_type(hw::device::device_type device_type)
+@@ -5590,6 +5613,48 @@ void wallet2::init_type(hw::device::device_type device_type)
m_key_device_type = device_type;
}
@@ -1316,7 +1313,7 @@ index 4f58d7aea..1b3a66279 100644
/*!
* \brief Generates a wallet or restores one. Assumes the multisig setup
* has already completed for the provided multisig info.
-@@ -5715,7 +5780,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5717,7 +5782,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
return retval;
}
@@ -1325,7 +1322,7 @@ index 4f58d7aea..1b3a66279 100644
{
// -1 month for fluctuations in block time and machine date/time setup.
// avg seconds per block
-@@ -5739,7 +5804,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5741,7 +5806,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.
@@ -1334,25 +1331,19 @@ index 4f58d7aea..1b3a66279 100644
uint64_t target_height = get_daemon_blockchain_target_height(err);
if (err.empty()) {
if (target_height < height)
-@@ -13636,7 +13701,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
+@@ -13634,9 +13699,10 @@ 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
{
- // time of v2 fork
- const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658;
-@@ -13645,7 +13710,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const
- // avg seconds per block
- const int seconds_per_block = DIFFICULTY_TARGET_V2;
- // Calculated blockchain height
-- uint64_t approx_blockchain_height = fork_block + (time(NULL) - fork_time)/seconds_per_block;
-+ uint64_t approx_blockchain_height = fork_block + ((t > 0 ? t : time(NULL)) - fork_time)/seconds_per_block;
- // 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)
-@@ -15784,15 +15849,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
+ uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/307;
++ // uint64_t approx_blockchain_height = fork_block + ((t > 0 ? t : time(NULL)) - fork_time)/seconds_per_block;
+ LOG_PRINT_L2("Calculated blockchain height: " << approx_blockchain_height);
+ return approx_blockchain_height;
+ }
+@@ -15771,15 +15837,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)
{
@@ -1368,7 +1359,7 @@ index 4f58d7aea..1b3a66279 100644
std::tm date = { 0, 0, 0, 0, 0, 0, 0, 0 };
date.tm_year = year - 1900;
date.tm_mon = month - 1;
-@@ -15801,7 +15857,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
+@@ -15788,7 +15845,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");
}
@@ -1393,7 +1384,7 @@ index 4f58d7aea..1b3a66279 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 1d7e430b9..91cf2a376 100644
+index 80ff0698d..c26349ce3 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -72,6 +72,7 @@
@@ -1469,5 +1460,5 @@ index 1d7e430b9..91cf2a376 100644
uint32_t m_multisig_threshold;
std::vector<crypto::public_key> m_multisig_signers;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0010-coin-control.patch b/patches/wownero/0010-coin-control.patch
index c6ec734..2362fed 100644
--- a/patches/monero/0010-coin-control.patch
+++ b/patches/wownero/0010-coin-control.patch
@@ -1,7 +1,7 @@
-From 71fee81e40348ebf18995033fbf42e64d7522c6d Mon Sep 17 00:00:00 2001
+From 14bcfd4bb49e7697c034d3d38c988f90a1842145 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 11:07:57 +0100
-Subject: [PATCH 10/12] coin control
+Subject: [PATCH 10/15] coin control
---
src/simplewallet/simplewallet.cpp | 2 +-
@@ -22,10 +22,10 @@ Subject: [PATCH 10/12] coin control
create mode 100644 src/wallet/api/coins_info.h
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index 2c51337ef..645bd37e2 100644
+index 8c5122097..cfdb8935f 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
+@@ -6981,7 +6981,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 e74fa0884..66c1e45a6 100644
+index 704e5e148..e69910e69 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -35,6 +35,7 @@
@@ -777,7 +777,7 @@ index be1c3704e..013b5bcba 100644
virtual SubaddressAccount * subaddressAccount() = 0;
virtual void setListener(WalletListener *) = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 1b3a66279..007ec384c 100644
+index 3e49c21f8..4d756567f 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -2094,12 +2094,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
@@ -821,7 +821,7 @@ index 1b3a66279..007ec384c 100644
size_t wallet2::get_transfer_details(const crypto::key_image &ki) const
{
for (size_t idx = 0; idx < m_transfers.size(); ++idx)
-@@ -2521,6 +2542,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2523,6 +2544,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)
{
@@ -829,7 +829,7 @@ index 1b3a66279..007ec384c 100644
m_transfers.push_back(transfer_details{});
transfer_details& td = m_transfers.back();
td.m_block_height = height;
-@@ -2624,6 +2646,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2626,6 +2648,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
uint64_t extra_amount = amount - burnt;
if (!pool)
{
@@ -837,7 +837,7 @@ index 1b3a66279..007ec384c 100644
transfer_details &td = m_transfers[kit->second];
td.m_block_height = height;
td.m_internal_output_index = o;
-@@ -10501,7 +10524,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
+@@ -10497,7 +10520,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
LOG_PRINT_L2("transfer_selected_rct done");
}
@@ -846,7 +846,7 @@ index 1b3a66279..007ec384c 100644
{
std::vector<size_t> picks;
float current_output_relatdness = 1.0f;
-@@ -10512,6 +10535,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10508,6 +10531,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];
@@ -856,7 +856,7 @@ index 1b3a66279..007ec384c 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)
-@@ -10532,6 +10558,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10528,6 +10554,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];
@@ -866,7 +866,7 @@ index 1b3a66279..007ec384c 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)
-@@ -10543,6 +10572,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10539,6 +10568,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];
@@ -876,7 +876,7 @@ index 1b3a66279..007ec384c 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) << "]");
-@@ -11115,7 +11147,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
+@@ -11111,7 +11143,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.
@@ -885,7 +885,7 @@ index 1b3a66279..007ec384c 100644
{
//ensure device is let in NONE mode in any case
hw::device &hwdev = m_account.get_device();
-@@ -11323,6 +11355,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11319,6 +11351,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];
@@ -895,7 +895,7 @@ index 1b3a66279..007ec384c 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));
-@@ -11414,7 +11449,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11410,7 +11445,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);
@@ -904,7 +904,7 @@ index 1b3a66279..007ec384c 100644
if (!preferred_inputs.empty())
{
string s;
-@@ -11893,7 +11928,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
+@@ -11889,7 +11924,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
return true;
}
@@ -913,7 +913,7 @@ index 1b3a66279..007ec384c 100644
{
std::vector<size_t> unused_transfers_indices;
std::vector<size_t> unused_dust_indices;
-@@ -11922,6 +11957,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
+@@ -11918,6 +11953,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];
@@ -924,7 +924,7 @@ index 1b3a66279..007ec384c 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 91cf2a376..bc16d528c 100644
+index c26349ce3..a48ba33b6 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1209,8 +1209,8 @@ private:
@@ -975,5 +975,5 @@ index 91cf2a376..bc16d528c 100644
void set_unspent(size_t idx);
bool is_spent(const transfer_details &td, bool strict = true) const;
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
index d026065..f130f51 100644
--- a/patches/monero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
+++ b/patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
@@ -1,7 +1,7 @@
-From c7bf71b5069ba8ea71022fab516b40bf85da2a79 Mon Sep 17 00:00:00 2001
+From 7c4f0b36d627bf4d1ce198240c1e974eff27bbec Mon Sep 17 00:00:00 2001
From: M <m@cakewallet.com>
Date: Fri, 21 Apr 2023 15:43:47 -0400
-Subject: [PATCH 11/12] Add hex encoding and tx key getter for
+Subject: [PATCH 11/15] Add hex encoding and tx key getter for
PendingTransction in wallet api.
---
@@ -64,5 +64,5 @@ index 013b5bcba..f421fdc05 100644
/**
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0012-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch
index a4bda2c..a15e54c 100644
--- a/patches/monero/0012-Add-recoverDeterministicWalletFromSpendKey.patch
+++ b/patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch
@@ -1,7 +1,7 @@
-From a9977b076cf6aa260059bd272abbf1af580d2f72 Mon Sep 17 00:00:00 2001
+From 298c7e0745306605d7ed1cee320b92eacf8aaeb6 Mon Sep 17 00:00:00 2001
From: Konstantin Ullrich <konstantinullrich12@gmail.com>
Date: Wed, 11 Oct 2023 16:47:59 +0200
-Subject: [PATCH 12/12] Add recoverDeterministicWalletFromSpendKey
+Subject: [PATCH 12/15] 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 66c1e45a6..cb09db8b2 100644
+index e69910e69..e650e6044 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
@@ -104,7 +104,7 @@ index f421fdc05..c8d6bb179 100644
* \deprecated this method creates a wallet WITHOUT a passphrase, use createWalletFromKeys(..., password, ...) instead
* \brief recovers existing wallet using keys. Creates a view only wallet if spend key is omitted
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
-index c79fe25d6..f88bd9e64 100644
+index da2056d8a..c200f52ae 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -127,6 +127,22 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
@@ -149,5 +149,5 @@ index 28fcd36c9..be3ff8184 100644
const std::string &password,
NetworkType nettype,
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/monero/0013-add-monero-submodule-support.patch b/patches/wownero/0013-add-monero-submodule-support.patch
index 97dcc90..f220055 100644
--- a/patches/monero/0013-add-monero-submodule-support.patch
+++ b/patches/wownero/0013-add-monero-submodule-support.patch
@@ -1,7 +1,7 @@
-From c7a565ce333b11e4eaa25a1cf6035837146273d7 Mon Sep 17 00:00:00 2001
+From 1bd61531746e983799fcae9d3a7228620bbc84f5 Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Thu, 7 Nov 2024 16:46:24 +0000
-Subject: [PATCH] add monero submodule support
+Subject: [PATCH 13/15] add monero submodule support
---
CMakeLists.txt | 6 +++---
@@ -10,7 +10,7 @@ Subject: [PATCH] add monero submodule support
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e7fa90abb..b995a68b2 100644
+index 85a62ef7b..763d240fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,9 +223,9 @@ function(forbid_undefined_symbols)
@@ -25,7 +25,7 @@ index e7fa90abb..b995a68b2 100644
endif()
add_library(l0 SHARED incorrect_source.cpp)
add_library(l1 MODULE incorrect_source.cpp)
-@@ -390,7 +390,7 @@ else()
+@@ -391,7 +391,7 @@ else()
endif()
list(INSERT CMAKE_MODULE_PATH 0
@@ -48,10 +48,10 @@ index 7ecf5f610..89fb9d167 100644
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${flag}")
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index d24b4c563..91f692599 100644
+index 3cc6b278f..071434486 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
-@@ -1163,7 +1163,7 @@ namespace tools
+@@ -1162,7 +1162,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 +61,5 @@ index d24b4c563..91f692599 100644
if (ptx_vector.empty())
{
--
-2.43.0
+2.39.5 (Apple Git-154)
diff --git a/patches/wownero/0014-build-wownero-seed.patch b/patches/wownero/0014-build-wownero-seed.patch
deleted file mode 100644
index 2b7f867..0000000
--- a/patches/wownero/0014-build-wownero-seed.patch
+++ /dev/null
@@ -1,614 +0,0 @@
-From 8d1cd10b2514d225ae5d2d6f73947529647392e7 Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Thu, 25 Apr 2024 10:06:04 +0200
-Subject: [PATCH 14/17] build wownero-seed
-
----
- contrib/depends/hosts/android.mk | 4 +-
- contrib/depends/hosts/darwin.mk | 1 +
- contrib/depends/hosts/mingw32.mk | 3 +
- contrib/depends/packages/packages.mk | 2 +-
- contrib/depends/packages/wownero_seed.mk | 35 ++
- .../0001-fix-duplicate-symbol-error.patch | 497 ++++++++++++++++++
- 6 files changed, 539 insertions(+), 3 deletions(-)
- create mode 100644 contrib/depends/packages/wownero_seed.mk
- create mode 100644 contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch
-
-diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk
-index 827103c36..8aad7ec65 100644
---- a/contrib/depends/hosts/android.mk
-+++ b/contrib/depends/hosts/android.mk
-@@ -15,8 +15,8 @@ endif
-
- android_CC=$(host_toolchain)clang
- android_CXX=$(host_toolchain)clang++
--android_RANLIB=llvm-ranlib
--android_AR=llvm-ar
-+android_RANLIB=$(host_toolchain)ranlib
-+android_AR=$(host_toolchain)ar
-
- android_CFLAGS=-pipe
- android_CXXFLAGS=$(android_CFLAGS)
-diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
-index b14ee5c5b..2168702aa 100644
---- a/contrib/depends/hosts/darwin.mk
-+++ b/contrib/depends/hosts/darwin.mk
-@@ -9,6 +9,7 @@ darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --s
- darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
-
- darwin_RANLIB=$(host_prefix)/native/bin/$(host)-ranlib
-+darwin_AR=$(host_prefix)/native/bin/$(host)-ar
-
- darwin_CFLAGS=-pipe
- darwin_CXXFLAGS=$(darwin_CFLAGS)
-diff --git a/contrib/depends/hosts/mingw32.mk b/contrib/depends/hosts/mingw32.mk
-index ccc4c5082..4677694a6 100644
---- a/contrib/depends/hosts/mingw32.mk
-+++ b/contrib/depends/hosts/mingw32.mk
-@@ -2,6 +2,9 @@ mingw32_CFLAGS=-pipe
- mingw32_CXXFLAGS=$(mingw32_CFLAGS)
- mingw32_ARFLAGS=cr
-
-+mingw32_RANLIB=$(shell which $(host)-ranlib)
-+mingw32_AR=$(shell which $(host)-ar)
-+
- mingw32_release_CFLAGS=-O2
- mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
-
-diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
-index 8783d4955..3d513c5a2 100644
---- a/contrib/depends/packages/packages.mk
-+++ b/contrib/depends/packages/packages.mk
-@@ -1,4 +1,4 @@
--packages:=boost openssl zeromq libiconv expat unbound polyseed
-+packages:=boost openssl zeromq libiconv expat unbound polyseed wownero_seed
-
- # ccache is useless in gitian builds
- ifneq ($(GITIAN),1)
-diff --git a/contrib/depends/packages/wownero_seed.mk b/contrib/depends/packages/wownero_seed.mk
-new file mode 100644
-index 000000000..b376f80c5
---- /dev/null
-+++ b/contrib/depends/packages/wownero_seed.mk
-@@ -0,0 +1,35 @@
-+package=wownero_seed
-+$(package)_version=0.3.0
-+$(package)_download_path=https://github.com/MrCyjaneK/wownero-seed/archive/
-+$(package)_download_file=d3f68be347facfeebbd8f68fd74982c705cb917b.tar.gz
-+$(package)_file_name=$(package)-$($(package)_version).tar.gz
-+$(package)_sha256_hash=3b59ccde08e0fee204680240af4b270a18a677aa0e6036a3504570193d232406
-+$(package)_patches=0001-fix-duplicate-symbol-error.patch
-+
-+define $(package)_preprocess_cmds
-+ patch -p1 < $($(package)_patch_dir)/0001-fix-duplicate-symbol-error.patch
-+endef
-+
-+
-+ifeq ($(host_os),darwin)
-+ define $(package)_config_cmds
-+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_RANLIB="$($(package)_ranlib)" -DCMAKE_AR="$($(package)_ar)" -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
-+ endef
-+else
-+ define $(package)_config_cmds
-+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
-+ endef
-+endif
-+
-+define $(package)_set_vars
-+ $(package)_build_opts=CC="$($(package)_cc)" CXX="$($(package)_cxx)"
-+endef
-+
-+
-+define $(package)_build_cmds
-+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" $(MAKE) VERBOSE=1
-+endef
-+
-+define $(package)_stage_cmds
-+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" $(MAKE) DESTDIR=$($(package)_staging_dir) install
-+endef
-diff --git a/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch b/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch
-new file mode 100644
-index 000000000..a8f8fe059
---- /dev/null
-+++ b/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch
-@@ -0,0 +1,497 @@
-+From 4be93209afb80b11834a0849391ee6eeb68aec4a Mon Sep 17 00:00:00 2001
-+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-+Date: Thu, 25 Apr 2024 09:37:37 +0200
-+Subject: [PATCH] fix duplicate symbol error
-+
-+---
-+ src/argon2/argon2.c | 8 +++---
-+ src/argon2/argon2.h | 4 +--
-+ src/argon2/blake2/blake2.h | 12 ++++-----
-+ src/argon2/blake2/blake2b.c | 46 ++++++++++++++++----------------
-+ src/argon2/core.c | 52 ++++++++++++++++++-------------------
-+ src/argon2/core.h | 17 ++++++------
-+ src/argon2/ref.c | 2 +-
-+ 7 files changed, 70 insertions(+), 71 deletions(-)
-+
-+diff --git a/src/argon2/argon2.c b/src/argon2/argon2.c
-+index e9882b7..470dc26 100644
-+--- a/src/argon2/argon2.c
-++++ b/src/argon2/argon2.c
-+@@ -37,7 +37,7 @@ const char *argon2_type2string(argon2_type type, int uppercase) {
-+
-+ int argon2_ctx(argon2_context *context, argon2_type type) {
-+ /* 1. Validate all inputs */
-+- int result = validate_inputs(context);
-++ int result = validate_inputs_wowseed(context);
-+ uint32_t memory_blocks, segment_length;
-+ argon2_instance_t instance;
-+
-+@@ -78,20 +78,20 @@ int argon2_ctx(argon2_context *context, argon2_type type) {
-+ /* 3. Initialization: Hashing inputs, allocating memory, filling first
-+ * blocks
-+ */
-+- result = initialize(&instance, context);
-++ result = initialize_wowseed(&instance, context);
-+
-+ if (ARGON2_OK != result) {
-+ return result;
-+ }
-+
-+ /* 4. Filling memory */
-+- result = fill_memory_blocks(&instance);
-++ result = _fill_memory_blocks_wowseed(&instance);
-+
-+ if (ARGON2_OK != result) {
-+ return result;
-+ }
-+ /* 5. Finalization */
-+- finalize(context, &instance);
-++ finalize_wowseed(context, &instance);
-+
-+ return ARGON2_OK;
-+ }
-+diff --git a/src/argon2/argon2.h b/src/argon2/argon2.h
-+index 1b471f6..f60e269 100644
-+--- a/src/argon2/argon2.h
-++++ b/src/argon2/argon2.h
-+@@ -185,7 +185,7 @@ typedef void (*deallocate_fptr)(uint8_t *memory, size_t bytes_to_allocate);
-+ * 4 parallel lanes.
-+ * You want to erase the password, but you're OK with last pass not being
-+ * erased. You want to use the default memory allocator.
-+- * Then you initialize:
-++ * Then you initialize_wowseed:
-+ Argon2_Context(out,8,pwd,32,salt,16,NULL,0,NULL,0,5,1<<20,4,4,NULL,NULL,true,false,false,false)
-+ */
-+ typedef struct Argon2_Context {
-+@@ -329,7 +329,7 @@ ARGON2_PUBLIC int argon2_hash(const uint32_t t_cost, const uint32_t m_cost,
-+
-+ /**
-+ * Verifies a password against an encoded string
-+- * Encoded string is restricted as in validate_inputs()
-++ * Encoded string is restricted as in validate_inputs_wowseed()
-+ * @param encoded String encoding parameters, salt, hash
-+ * @param pwd Pointer to password
-+ * @pre Returns ARGON2_OK if successful
-+diff --git a/src/argon2/blake2/blake2.h b/src/argon2/blake2/blake2.h
-+index 9f97e1c..25b445d 100644
-+--- a/src/argon2/blake2/blake2.h
-++++ b/src/argon2/blake2/blake2.h
-+@@ -67,15 +67,15 @@ enum {
-+ };
-+
-+ /* Streaming API */
-+-ARGON2_LOCAL int blake2b_init(blake2b_state *S, size_t outlen);
-+-ARGON2_LOCAL int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key,
-++ARGON2_LOCAL int blake2b_init_wowseed(blake2b_state *S, size_t outlen);
-++ARGON2_LOCAL int blake2b_init_key_wowseed(blake2b_state *S, size_t outlen, const void *key,
-+ size_t keylen);
-+-ARGON2_LOCAL int blake2b_init_param(blake2b_state *S, const blake2b_param *P);
-+-ARGON2_LOCAL int blake2b_update(blake2b_state *S, const void *in, size_t inlen);
-+-ARGON2_LOCAL int blake2b_final(blake2b_state *S, void *out, size_t outlen);
-++ARGON2_LOCAL int blake2b_init_param_wowseed(blake2b_state *S, const blake2b_param *P);
-++ARGON2_LOCAL int blake2b_update_wowseed(blake2b_state *S, const void *in, size_t inlen);
-++ARGON2_LOCAL int blake2b_final_wowseed(blake2b_state *S, void *out, size_t outlen);
-+
-+ /* Simple API */
-+-ARGON2_LOCAL int blake2b(void *out, size_t outlen, const void *in, size_t inlen,
-++ARGON2_LOCAL int blake2b_wowseed(void *out, size_t outlen, const void *in, size_t inlen,
-+ const void *key, size_t keylen);
-+
-+ /* Argon2 Team - Begin Code */
-+diff --git a/src/argon2/blake2/blake2b.c b/src/argon2/blake2/blake2b.c
-+index ca05df5..8138b86 100644
-+--- a/src/argon2/blake2/blake2b.c
-++++ b/src/argon2/blake2/blake2b.c
-+@@ -70,7 +70,7 @@ static BLAKE2_INLINE void blake2b_init0(blake2b_state *S) {
-+ memcpy(S->h, blake2b_IV, sizeof(S->h));
-+ }
-+
-+-int blake2b_init_param(blake2b_state *S, const blake2b_param *P) {
-++int blake2b_init_param_wowseed(blake2b_state *S, const blake2b_param *P) {
-+ const unsigned char *p = (const unsigned char *)P;
-+ unsigned int i;
-+
-+@@ -88,7 +88,7 @@ int blake2b_init_param(blake2b_state *S, const blake2b_param *P) {
-+ }
-+
-+ /* Sequential blake2b initialization */
-+-int blake2b_init(blake2b_state *S, size_t outlen) {
-++int blake2b_init_wowseed(blake2b_state *S, size_t outlen) {
-+ blake2b_param P;
-+
-+ if (S == NULL) {
-+@@ -113,10 +113,10 @@ int blake2b_init(blake2b_state *S, size_t outlen) {
-+ memset(P.salt, 0, sizeof(P.salt));
-+ memset(P.personal, 0, sizeof(P.personal));
-+
-+- return blake2b_init_param(S, &P);
-++ return blake2b_init_param_wowseed(S, &P);
-+ }
-+
-+-int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key,
-++int blake2b_init_key_wowseed(blake2b_state *S, size_t outlen, const void *key,
-+ size_t keylen) {
-+ blake2b_param P;
-+
-+@@ -147,7 +147,7 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key,
-+ memset(P.salt, 0, sizeof(P.salt));
-+ memset(P.personal, 0, sizeof(P.personal));
-+
-+- if (blake2b_init_param(S, &P) < 0) {
-++ if (blake2b_init_param_wowseed(S, &P) < 0) {
-+ blake2b_invalidate_state(S);
-+ return -1;
-+ }
-+@@ -156,7 +156,7 @@ int blake2b_init_key(blake2b_state *S, size_t outlen, const void *key,
-+ uint8_t block[BLAKE2B_BLOCKBYTES];
-+ memset(block, 0, BLAKE2B_BLOCKBYTES);
-+ memcpy(block, key, keylen);
-+- blake2b_update(S, block, BLAKE2B_BLOCKBYTES);
-++ blake2b_update_wowseed(S, block, BLAKE2B_BLOCKBYTES);
-+ /* Burn the key from stack */
-+ clear_internal_memory(block, BLAKE2B_BLOCKBYTES);
-+ }
-+@@ -221,7 +221,7 @@ static void blake2b_compress(blake2b_state *S, const uint8_t *block) {
-+ #undef ROUND
-+ }
-+
-+-int blake2b_update(blake2b_state *S, const void *in, size_t inlen) {
-++int blake2b_update_wowseed(blake2b_state *S, const void *in, size_t inlen) {
-+ const uint8_t *pin = (const uint8_t *)in;
-+
-+ if (inlen == 0) {
-+@@ -261,7 +261,7 @@ int blake2b_update(blake2b_state *S, const void *in, size_t inlen) {
-+ return 0;
-+ }
-+
-+-int blake2b_final(blake2b_state *S, void *out, size_t outlen) {
-++int blake2b_final_wowseed(blake2b_state *S, void *out, size_t outlen) {
-+ uint8_t buffer[BLAKE2B_OUTBYTES] = {0};
-+ unsigned int i;
-+
-+@@ -291,7 +291,7 @@ int blake2b_final(blake2b_state *S, void *out, size_t outlen) {
-+ return 0;
-+ }
-+
-+-int blake2b(void *out, size_t outlen, const void *in, size_t inlen,
-++int blake2b_wowseed(void *out, size_t outlen, const void *in, size_t inlen,
-+ const void *key, size_t keylen) {
-+ blake2b_state S;
-+ int ret = -1;
-+@@ -310,19 +310,19 @@ int blake2b(void *out, size_t outlen, const void *in, size_t inlen,
-+ }
-+
-+ if (keylen > 0) {
-+- if (blake2b_init_key(&S, outlen, key, keylen) < 0) {
-++ if (blake2b_init_key_wowseed(&S, outlen, key, keylen) < 0) {
-+ goto fail;
-+ }
-+ } else {
-+- if (blake2b_init(&S, outlen) < 0) {
-++ if (blake2b_init_wowseed(&S, outlen) < 0) {
-+ goto fail;
-+ }
-+ }
-+
-+- if (blake2b_update(&S, in, inlen) < 0) {
-++ if (blake2b_update_wowseed(&S, in, inlen) < 0) {
-+ goto fail;
-+ }
-+- ret = blake2b_final(&S, out, outlen);
-++ ret = blake2b_final_wowseed(&S, out, outlen);
-+
-+ fail:
-+ clear_internal_memory(&S, sizeof(S));
-+@@ -352,25 +352,25 @@ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) {
-+ } while ((void)0, 0)
-+
-+ if (outlen <= BLAKE2B_OUTBYTES) {
-+- TRY(blake2b_init(&blake_state, outlen));
-+- TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)));
-+- TRY(blake2b_update(&blake_state, in, inlen));
-+- TRY(blake2b_final(&blake_state, out, outlen));
-++ TRY(blake2b_init_wowseed(&blake_state, outlen));
-++ TRY(blake2b_update_wowseed(&blake_state, outlen_bytes, sizeof(outlen_bytes)));
-++ TRY(blake2b_update_wowseed(&blake_state, in, inlen));
-++ TRY(blake2b_final_wowseed(&blake_state, out, outlen));
-+ } else {
-+ uint32_t toproduce;
-+ uint8_t out_buffer[BLAKE2B_OUTBYTES];
-+ uint8_t in_buffer[BLAKE2B_OUTBYTES];
-+- TRY(blake2b_init(&blake_state, BLAKE2B_OUTBYTES));
-+- TRY(blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes)));
-+- TRY(blake2b_update(&blake_state, in, inlen));
-+- TRY(blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES));
-++ TRY(blake2b_init_wowseed(&blake_state, BLAKE2B_OUTBYTES));
-++ TRY(blake2b_update_wowseed(&blake_state, outlen_bytes, sizeof(outlen_bytes)));
-++ TRY(blake2b_update_wowseed(&blake_state, in, inlen));
-++ TRY(blake2b_final_wowseed(&blake_state, out_buffer, BLAKE2B_OUTBYTES));
-+ memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2);
-+ out += BLAKE2B_OUTBYTES / 2;
-+ toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2;
-+
-+ while (toproduce > BLAKE2B_OUTBYTES) {
-+ memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES);
-+- TRY(blake2b(out_buffer, BLAKE2B_OUTBYTES, in_buffer,
-++ TRY(blake2b_wowseed(out_buffer, BLAKE2B_OUTBYTES, in_buffer,
-+ BLAKE2B_OUTBYTES, NULL, 0));
-+ memcpy(out, out_buffer, BLAKE2B_OUTBYTES / 2);
-+ out += BLAKE2B_OUTBYTES / 2;
-+@@ -378,7 +378,7 @@ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) {
-+ }
-+
-+ memcpy(in_buffer, out_buffer, BLAKE2B_OUTBYTES);
-+- TRY(blake2b(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL,
-++ TRY(blake2b_wowseed(out_buffer, toproduce, in_buffer, BLAKE2B_OUTBYTES, NULL,
-+ 0));
-+ memcpy(out, out_buffer, toproduce);
-+ }
-+diff --git a/src/argon2/core.c b/src/argon2/core.c
-+index 5eafe08..c25eb53 100644
-+--- a/src/argon2/core.c
-++++ b/src/argon2/core.c
-+@@ -151,7 +151,7 @@ void clear_internal_memory(void *v, size_t n) {
-+ }
-+ }
-+
-+-void finalize(const argon2_context *context, argon2_instance_t *instance) {
-++void finalize_wowseed(const argon2_context *context, argon2_instance_t *instance) {
-+ if (context != NULL && instance != NULL) {
-+ block blockhash;
-+ uint32_t l;
-+@@ -256,7 +256,7 @@ uint32_t index_alpha(const argon2_instance_t *instance,
-+ }
-+
-+ /* Single-threaded version for p=1 case */
-+-static int fill_memory_blocks_st(argon2_instance_t *instance) {
-++static int _fill_memory_blocks_wowseed_st(argon2_instance_t *instance) {
-+ uint32_t r, s, l;
-+
-+ for (r = 0; r < instance->passes; ++r) {
-+@@ -273,14 +273,14 @@ static int fill_memory_blocks_st(argon2_instance_t *instance) {
-+ return ARGON2_OK;
-+ }
-+
-+-int fill_memory_blocks(argon2_instance_t *instance) {
-++int _fill_memory_blocks_wowseed(argon2_instance_t *instance) {
-+ if (instance == NULL || instance->lanes == 0) {
-+ return ARGON2_INCORRECT_PARAMETER;
-+ }
-+- return fill_memory_blocks_st(instance);
-++ return _fill_memory_blocks_wowseed_st(instance);
-+ }
-+
-+-int validate_inputs(const argon2_context *context) {
-++int validate_inputs_wowseed(const argon2_context *context) {
-+ if (NULL == context) {
-+ return ARGON2_INCORRECT_PARAMETER;
-+ }
-+@@ -407,7 +407,7 @@ int validate_inputs(const argon2_context *context) {
-+ return ARGON2_OK;
-+ }
-+
-+-void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance) {
-++void fill_first_blocks_wowseed(uint8_t *blockhash, const argon2_instance_t *instance) {
-+ uint32_t l;
-+ /* Make the first and second block in each lane as G(H0||0||i) or
-+ G(H0||1||i) */
-+@@ -430,7 +430,7 @@ void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance) {
-+ clear_internal_memory(blockhash_bytes, ARGON2_BLOCK_SIZE);
-+ }
-+
-+-void initial_hash(uint8_t *blockhash, argon2_context *context,
-++void initial_hash_wowseed(uint8_t *blockhash, argon2_context *context,
-+ argon2_type type) {
-+ blake2b_state BlakeHash;
-+ uint8_t value[sizeof(uint32_t)];
-+@@ -439,31 +439,31 @@ void initial_hash(uint8_t *blockhash, argon2_context *context,
-+ return;
-+ }
-+
-+- blake2b_init(&BlakeHash, ARGON2_PREHASH_DIGEST_LENGTH);
-++ blake2b_init_wowseed(&BlakeHash, ARGON2_PREHASH_DIGEST_LENGTH);
-+
-+ store32(&value, context->lanes);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ store32(&value, context->outlen);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ store32(&value, context->m_cost);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ store32(&value, context->t_cost);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ store32(&value, context->version);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ store32(&value, (uint32_t)type);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ store32(&value, context->pwdlen);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ if (context->pwd != NULL) {
-+- blake2b_update(&BlakeHash, (const uint8_t *)context->pwd,
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->pwd,
-+ context->pwdlen);
-+
-+ if (context->flags & ARGON2_FLAG_CLEAR_PASSWORD) {
-+@@ -473,18 +473,18 @@ void initial_hash(uint8_t *blockhash, argon2_context *context,
-+ }
-+
-+ store32(&value, context->saltlen);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ if (context->salt != NULL) {
-+- blake2b_update(&BlakeHash, (const uint8_t *)context->salt,
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->salt,
-+ context->saltlen);
-+ }
-+
-+ store32(&value, context->secretlen);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ if (context->secret != NULL) {
-+- blake2b_update(&BlakeHash, (const uint8_t *)context->secret,
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->secret,
-+ context->secretlen);
-+
-+ if (context->flags & ARGON2_FLAG_CLEAR_SECRET) {
-+@@ -494,17 +494,17 @@ void initial_hash(uint8_t *blockhash, argon2_context *context,
-+ }
-+
-+ store32(&value, context->adlen);
-+- blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)&value, sizeof(value));
-+
-+ if (context->ad != NULL) {
-+- blake2b_update(&BlakeHash, (const uint8_t *)context->ad,
-++ blake2b_update_wowseed(&BlakeHash, (const uint8_t *)context->ad,
-+ context->adlen);
-+ }
-+
-+- blake2b_final(&BlakeHash, blockhash, ARGON2_PREHASH_DIGEST_LENGTH);
-++ blake2b_final_wowseed(&BlakeHash, blockhash, ARGON2_PREHASH_DIGEST_LENGTH);
-+ }
-+
-+-int initialize(argon2_instance_t *instance, argon2_context *context) {
-++int initialize_wowseed(argon2_instance_t *instance, argon2_context *context) {
-+ uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH];
-+ int result = ARGON2_OK;
-+
-+@@ -523,7 +523,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context) {
-+ /* H_0 + 8 extra bytes to produce the first blocks */
-+ /* uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH]; */
-+ /* Hashing all inputs */
-+- initial_hash(blockhash, context, instance->type);
-++ initial_hash_wowseed(blockhash, context, instance->type);
-+ /* Zeroing 8 extra bytes */
-+ clear_internal_memory(blockhash + ARGON2_PREHASH_DIGEST_LENGTH,
-+ ARGON2_PREHASH_SEED_LENGTH -
-+@@ -535,7 +535,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context) {
-+
-+ /* 3. Creating first blocks, we always have at least two blocks in a slice
-+ */
-+- fill_first_blocks(blockhash, instance);
-++ fill_first_blocks_wowseed(blockhash, instance);
-+ /* Clearing the hash */
-+ clear_internal_memory(blockhash, ARGON2_PREHASH_SEED_LENGTH);
-+
-+diff --git a/src/argon2/core.h b/src/argon2/core.h
-+index 78000ba..6b0154c 100644
-+--- a/src/argon2/core.h
-++++ b/src/argon2/core.h
-+@@ -53,7 +53,7 @@ typedef struct block_ { uint64_t v[ARGON2_QWORDS_IN_BLOCK]; } block;
-+
-+ /*****************Functions that work with the block******************/
-+
-+-/* Initialize each byte of the block with @in */
-++/* initialize_wowseed each byte of the block with @in */
-+ void init_block_value(block *b, uint8_t in);
-+
-+ /* Copy block @src to block @dst */
-+@@ -158,7 +158,7 @@ uint32_t index_alpha(const argon2_instance_t *instance,
-+ * @return ARGON2_OK if everything is all right, otherwise one of error codes
-+ * (all defined in <argon2.h>
-+ */
-+-int validate_inputs(const argon2_context *context);
-++int validate_inputs_wowseed(const argon2_context *context);
-+
-+ /*
-+ * Hashes all the inputs into @a blockhash[PREHASH_DIGEST_LENGTH], clears
-+@@ -170,28 +170,27 @@ int validate_inputs(const argon2_context *context);
-+ * @pre @a blockhash must have at least @a PREHASH_DIGEST_LENGTH bytes
-+ * allocated
-+ */
-+-void initial_hash(uint8_t *blockhash, argon2_context *context,
-++void initial_hash_wowseed(uint8_t *blockhash, argon2_context *context,
-+ argon2_type type);
-+-
-+ /*
-+ * Function creates first 2 blocks per lane
-+ * @param instance Pointer to the current instance
-+ * @param blockhash Pointer to the pre-hashing digest
-+ * @pre blockhash must point to @a PREHASH_SEED_LENGTH allocated values
-+ */
-+-void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance);
-++void fill_first_blocks_wowseed(uint8_t *blockhash, const argon2_instance_t *instance);
-+
-+ /*
-+ * Function allocates memory, hashes the inputs with Blake, and creates first
-+ * two blocks. Returns the pointer to the main memory with 2 blocks per lane
-+- * initialized
-++ * initialize_wowseedd
-+ * @param context Pointer to the Argon2 internal structure containing memory
-+ * pointer, and parameters for time and space requirements.
-+ * @param instance Current Argon2 instance
-+ * @return Zero if successful, -1 if memory failed to allocate. @context->state
-+ * will be modified if successful.
-+ */
-+-int initialize(argon2_instance_t *instance, argon2_context *context);
-++int initialize_wowseed(argon2_instance_t *instance, argon2_context *context);
-+
-+ /*
-+ * XORing the last block of each lane, hashing it, making the tag. Deallocates
-+@@ -204,7 +203,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context);
-+ * @pre if context->free_cbk is not NULL, it should point to a function that
-+ * deallocates memory
-+ */
-+-void finalize(const argon2_context *context, argon2_instance_t *instance);
-++void finalize_wowseed(const argon2_context *context, argon2_instance_t *instance);
-+
-+ /*
-+ * Function that fills the segment using previous segments also from other
-+@@ -223,6 +222,6 @@ void fill_segment(const argon2_instance_t *instance,
-+ * @param instance Pointer to the current instance
-+ * @return ARGON2_OK if successful, @context->state
-+ */
-+-int fill_memory_blocks(argon2_instance_t *instance);
-++int _fill_memory_blocks_wowseed(argon2_instance_t *instance);
-+
-+ #endif
-+diff --git a/src/argon2/ref.c b/src/argon2/ref.c
-+index ad1cf46..7edbd6e 100644
-+--- a/src/argon2/ref.c
-++++ b/src/argon2/ref.c
-+@@ -29,7 +29,7 @@
-+
-+ /*
-+ * Function fills a new memory block and optionally XORs the old block over the new one.
-+- * @next_block must be initialized.
-++ * @next_block must be initialize_wowseedd.
-+ * @param prev_block Pointer to the previous block
-+ * @param ref_block Pointer to the reference block
-+ * @param next_block Pointer to the block to be constructed
-+--
-+2.39.2
---
-2.39.5 (Apple Git-154)
-
diff --git a/patches/monero/0014-fix-iOS-depends-build.patch b/patches/wownero/0014-fix-iOS-depends-build.patch
index fd01f9e..5e97b89 100644
--- a/patches/monero/0014-fix-iOS-depends-build.patch
+++ b/patches/wownero/0014-fix-iOS-depends-build.patch
@@ -1,7 +1,7 @@
-From 40d2ef7f253aafc16796c9465cd0d0a68ffeaa16 Mon Sep 17 00:00:00 2001
+From f9bf382c57e4a36044e7a0697dc36073487eadd3 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 21 Nov 2024 06:05:03 -0500
-Subject: [PATCH] fix iOS depends build
+Subject: [PATCH 14/15] fix iOS depends build
---
CMakeLists.txt | 4 ----
@@ -11,7 +11,7 @@ Subject: [PATCH] fix iOS depends build
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0d0a0e3..809bce6 100644
+index 763d240fc..e3a0faacd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,10 +39,6 @@ include(CheckLibraryExists)
@@ -26,7 +26,7 @@ index 0d0a0e3..809bce6 100644
message(STATUS "CMake version ${CMAKE_VERSION}")
diff --git a/src/checkpoints/CMakeLists.txt b/src/checkpoints/CMakeLists.txt
-index 665441f..841df32 100644
+index 665441f62..841df3256 100644
--- a/src/checkpoints/CMakeLists.txt
+++ b/src/checkpoints/CMakeLists.txt
@@ -28,7 +28,11 @@
@@ -43,7 +43,7 @@ index 665441f..841df32 100644
find_library(IOKIT_LIBRARY IOKit)
mark_as_advanced(IOKIT_LIBRARY)
diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt
-index 414936a..81c8176 100644
+index 414936a05..81c81767f 100644
--- a/src/cryptonote_basic/CMakeLists.txt
+++ b/src/cryptonote_basic/CMakeLists.txt
@@ -28,7 +28,11 @@
@@ -60,7 +60,7 @@ index 414936a..81c8176 100644
find_library(IOKIT_LIBRARY IOKit)
mark_as_advanced(IOKIT_LIBRARY)
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp
-index 71b8f78..0f53f02 100644
+index 83bea8b5b..dfb4b5c5a 100644
--- a/src/cryptonote_basic/miner.cpp
+++ b/src/cryptonote_basic/miner.cpp
@@ -45,7 +45,7 @@
@@ -72,7 +72,7 @@ index 71b8f78..0f53f02 100644
#include <sys/times.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/ps/IOPSKeys.h>
-@@ -883,7 +883,7 @@ namespace cryptonote
+@@ -971,7 +971,7 @@ namespace cryptonote
return true;
@@ -81,7 +81,7 @@ index 71b8f78..0f53f02 100644
mach_msg_type_number_t count;
kern_return_t status;
-@@ -949,7 +949,7 @@ namespace cryptonote
+@@ -1037,7 +1037,7 @@ namespace cryptonote
return true;
}
@@ -90,7 +90,7 @@ index 71b8f78..0f53f02 100644
struct tms tms;
if ( times(&tms) != (clock_t)-1 )
-@@ -978,7 +978,7 @@ namespace cryptonote
+@@ -1066,7 +1066,7 @@ namespace cryptonote
return boost::logic::tribool(power_status.ACLineStatus != 1);
}
diff --git a/patches/wownero/0016-include-locale-only-when-targeting-WIN32.patch b/patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch
index 725e1ff..512e012 100644
--- a/patches/wownero/0016-include-locale-only-when-targeting-WIN32.patch
+++ b/patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch
@@ -1,7 +1,7 @@
-From 5843cb6c653a65eab3aea5956b41150b7c94cb0a Mon Sep 17 00:00:00 2001
+From a6538084be4fdfbf84e7cbae2bce040aeaf4a4f9 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 18 Nov 2024 10:57:37 -0500
-Subject: [PATCH 16/17] include locale only when targeting WIN32
+Subject: [PATCH 15/15] include locale only when targeting WIN32
---
CMakeLists.txt | 5 ++++-
@@ -9,10 +9,10 @@ Subject: [PATCH 16/17] include locale only when targeting WIN32
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 763d240fc..1397bb217 100644
+index e3a0faacd..b9207ef2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1100,7 +1100,10 @@ if(STATIC)
+@@ -1096,7 +1096,10 @@ if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
@@ -25,7 +25,7 @@ index 763d240fc..1397bb217 100644
add_definitions(-DBOOST_NO_AUTO_PTR)
add_definitions(-DBOOST_UUID_DISABLE_ALIGNMENT) # This restores UUID's std::has_unique_object_representations property
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 685432597..c9ff4b860 100644
+index e650e6044..6d7553a1d 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -46,7 +46,9 @@
@@ -37,7 +37,7 @@ index 685432597..c9ff4b860 100644
+#endif
#include <boost/filesystem.hpp>
#include "bc-ur/src/bc-ur.hpp"
- #ifdef HIDAPI_DUMMY
+ #if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
--
2.39.5 (Apple Git-154)
diff --git a/patches/wownero/0017-ledger-dummy-fix.patch b/patches/wownero/0017-ledger-dummy-fix.patch
deleted file mode 100644
index 62ded03..0000000
--- a/patches/wownero/0017-ledger-dummy-fix.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From a2a5c6a81ae63b2a4a8fe02b7929dcf3084b2a51 Mon Sep 17 00:00:00 2001
-From: cyan <cyjan@mrcyjanek.net>
-Date: Tue, 26 Nov 2024 00:31:15 +0000
-Subject: [PATCH 17/17] ledger dummy fix
-
----
- src/device/device_io_dummy.cpp | 2 +-
- src/device/device_io_dummy.hpp | 2 +-
- src/device/device_ledger.hpp | 2 +-
- src/wallet/api/wallet.cpp | 36 +++++++++++++++++-----------------
- 4 files changed, 21 insertions(+), 21 deletions(-)
-
-diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
-index fb082694e..e7e79fb58 100644
---- a/src/device/device_io_dummy.cpp
-+++ b/src/device/device_io_dummy.cpp
-@@ -38,7 +38,7 @@
- // Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
- // own USB/BLE/other transport layer.
-
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
- #include <boost/scope_exit.hpp>
- #include "log.hpp"
- #include "device_io_dummy.hpp"
-diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
-index a1733616d..4a4807121 100644
---- a/src/device/device_io_dummy.hpp
-+++ b/src/device/device_io_dummy.hpp
-@@ -26,7 +26,7 @@
- // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- //
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
-
- #pragma once
-
-diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 506f27c4a..39454ca6d 100644
---- a/src/device/device_ledger.hpp
-+++ b/src/device/device_ledger.hpp
-@@ -149,7 +149,7 @@ namespace hw {
- mutable boost::mutex command_locker;
-
- //IO
--#ifdef HIDAPI_DUMMY
-+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
- hw::io::device_io_dummy hw_device;
- #else
- hw::io::device_io_hid hw_device;
-diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index c9ff4b860..313384f54 100644
---- a/src/wallet/api/wallet.cpp
-+++ b/src/wallet/api/wallet.cpp
-@@ -3339,8 +3339,8 @@ uint64_t WalletImpl::getBytesSent()
-
- // HIDAPI_DUMMY
- bool WalletImpl::getStateIsConnected() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::stateIsConnected;
-@@ -3348,8 +3348,8 @@ bool WalletImpl::getStateIsConnected() {
- }
-
- unsigned char* WalletImpl::getSendToDevice() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return {};
- #else
- return hw::io::device_io_dummy::sendToDevice;
-@@ -3357,8 +3357,8 @@ unsigned char* WalletImpl::getSendToDevice() {
- }
-
- size_t WalletImpl::getSendToDeviceLength() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return -1;
- #else
- return hw::io::device_io_dummy::sendToDeviceLength;
-@@ -3366,8 +3366,8 @@ size_t WalletImpl::getSendToDeviceLength() {
- }
-
- unsigned char* WalletImpl::getReceivedFromDevice() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return {};
- #else
- return hw::io::device_io_dummy::receivedFromDevice;
-@@ -3375,8 +3375,8 @@ unsigned char* WalletImpl::getReceivedFromDevice() {
- }
-
- size_t WalletImpl::getReceivedFromDeviceLength() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return -1;
- #else
- return hw::io::device_io_dummy::receivedFromDeviceLength;
-@@ -3384,8 +3384,8 @@ size_t WalletImpl::getReceivedFromDeviceLength() {
- }
-
- bool WalletImpl::getWaitsForDeviceSend() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::receivedFromDeviceLength;
-@@ -3393,8 +3393,8 @@ bool WalletImpl::getWaitsForDeviceSend() {
- }
-
- bool WalletImpl::getWaitsForDeviceReceive() {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return false;
- #else
- return hw::io::device_io_dummy::waitsForDeviceReceive;
-@@ -3402,8 +3402,8 @@ bool WalletImpl::getWaitsForDeviceReceive() {
- }
-
- void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return;
- #else
- hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
-@@ -3415,8 +3415,8 @@ void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
- }
-
- void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
-- #ifndef HIDAPI_DUMMY
-- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
-+ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
-+ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
- return;
- #else
- hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
---
-2.39.5 (Apple Git-154)
-
diff --git a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
index 56f4b5d..ab245e0 100644
--- a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
+++ b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
@@ -1,6 +1,6 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
const char * WOWNERO_wallet2_api_c_h_sha256 = "8a8d386dd5d996c89a0586c55b295ef95ca584bf1ffa26255152b291910a0a77";
-const char * WOWNERO_wallet2_api_c_cpp_sha256 = "07d67f34a07869aaa4af6ca04e142dbad2fb1fba0e2ebdefd22bc333fd982e25-dd46a31f3cab67b316e9239b15acf7d5cea60aa9";
+const char * WOWNERO_wallet2_api_c_cpp_sha256 = "80ec887a70b5198968a402cba0aca65880b55277ea6b1af718efa3951814a6cf-dd46a31f3cab67b316e9239b15acf7d5cea60aa9";
const char * WOWNERO_wallet2_api_c_exp_sha256 = "3673e40e1a7115552276d1d541f6e4d5a0fef47c40fff7b988f49923af84c8a4";
#endif