diff --git a/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch b/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch index 47e0168..2e7403e 100644 --- a/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch +++ b/patches/wownero/0001-Fix-wallet_api-compilation-target-https-git.wownero..patch @@ -1,7 +1,7 @@ -From 65bba6df70902a6783f3a179c7fe049a1293c9c2 Mon Sep 17 00:00:00 2001 +From 8b7d9017d465f4e7797291d56082100704a3c59a Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 26 Mar 2024 06:55:38 +0100 -Subject: [PATCH 1/9] Fix wallet_api compilation target +Subject: [PATCH 01/14] Fix wallet_api compilation target https://git.wownero.com/wownero/wownero/issues/483 --- @@ -27,5 +27,5 @@ index 823f122c2..d81ddec93 100644 pendingTxPostProcess(transaction); -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0002-polyseed.patch b/patches/wownero/0002-polyseed.patch index c607ecc..a31d0ac 100644 --- a/patches/wownero/0002-polyseed.patch +++ b/patches/wownero/0002-polyseed.patch @@ -1,7 +1,7 @@ -From b5f23b131c6eaaf6b2a772e63b9e236eb0c90d72 Mon Sep 17 00:00:00 2001 +From 114c13e1f26b32532a23e2db1c89403568bb8ee4 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 09:42:37 +0100 -Subject: [PATCH 2/9] polyseed +Subject: [PATCH 02/14] polyseed Co-authored-by: Czarek Nakamoto --- @@ -55,7 +55,7 @@ index 4c1e381c0..70bea03b3 100644 test-ubuntu: needs: build-ubuntu diff --git a/.gitmodules b/.gitmodules -index 74571d5ee..1c469941e 100644 +index e40b7b4c7..bd30f0444 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,6 +8,12 @@ @@ -467,7 +467,7 @@ index 000000000..f6253b9d7 \ No newline at end of file diff --git a/src/polyseed/polyseed.cpp b/src/polyseed/polyseed.cpp new file mode 100644 -index 000000000..0a8852777 +index 000000000..231a48a94 --- /dev/null +++ b/src/polyseed/polyseed.cpp @@ -0,0 +1,182 @@ @@ -519,7 +519,7 @@ index 000000000..0a8852777 + if (result < 0 || result > (POLYSEED_STR_SIZE - 1)) { + throw std::runtime_error("Unicode normalization failed"); + } -+ ++ + result = utf8proc_reencode(buffer, result, options); + if (result < 0 || result > POLYSEED_STR_SIZE) { + throw std::runtime_error("Unicode normalization failed"); @@ -828,7 +828,7 @@ index 000000000..2c8c777a7 +#endif //POLYSEED_HPP \ No newline at end of file diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index d81ddec93..ceb0bcb8b 100644 +index d81ddec93..db9c2b5d9 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -683,6 +683,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p @@ -875,7 +875,7 @@ index d81ddec93..ceb0bcb8b 100644 + } + + bool result = m_wallet->get_polyseed(seed_words_epee, passphrase_epee); -+ ++ + seed_words.assign(seed_words_epee.data(), seed_words_epee.size()); + passphrase.assign(passphrase_epee.data(), passphrase_epee.size()); + @@ -897,7 +897,7 @@ index d81ddec93..ceb0bcb8b 100644 +bool Wallet::createPolyseed(std::string &seed_words, std::string &err, const std::string &language) +{ + epee::wipeable_string seed_words_epee(seed_words.c_str(), seed_words.size()); -+ ++ + try { + polyseed::data polyseed(POLYSEED_COIN); + polyseed.create(0); @@ -1295,5 +1295,5 @@ index df34f9abf..db5c1feb3 100644 uint32_t m_multisig_threshold; std::vector m_multisig_signers; -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch b/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch index e87a73c..dd5f3c5 100644 --- a/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch +++ b/patches/wownero/0003-wallet-background-sync-with-just-the-view-key.patch @@ -1,7 +1,7 @@ -From ebd0430956c71356ffa3ae0f5cbc90a749ceabc7 Mon Sep 17 00:00:00 2001 +From 2d528c4fa050fe02f938bf460ff04192f0d3f288 Mon Sep 17 00:00:00 2001 From: j-berman Date: Thu, 13 Oct 2022 18:33:33 -0700 -Subject: [PATCH 3/9] wallet: background sync with just the view key +Subject: [PATCH 03/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 @@ -748,7 +748,7 @@ index 8e3477ba3..ae1aa312b 100644 bool set_show_detailed_prompt(const std::vector &args = std::vector()); bool set_inactivity_lock_timeout(const std::vector &args = std::vector()); diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index ceb0bcb8b..bf8a95ffe 100644 +index db9c2b5d9..27a4dc6c8 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -56,6 +56,40 @@ using namespace cryptonote; @@ -4347,5 +4347,5 @@ index 1e10e1f86..bff33a561 100644 + } + return self.rpc.send_json_rpc_request(stop_background_sync) -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0004-airgap.patch b/patches/wownero/0004-airgap.patch index 83b5a6b..36c8ce1 100644 --- a/patches/wownero/0004-airgap.patch +++ b/patches/wownero/0004-airgap.patch @@ -1,7 +1,7 @@ -From 4e71f9001a3857f499001e072d41fcc5cc64ad84 Mon Sep 17 00:00:00 2001 +From a6779dba0c87699f5818fbb679d6f77a945b3360 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 26 Mar 2024 09:06:32 +0100 -Subject: [PATCH 4/9] airgap +Subject: [PATCH 04/14] airgap --- src/wallet/api/wallet.cpp | 23 +++++++++++++++++++++++ @@ -12,7 +12,7 @@ Subject: [PATCH 4/9] airgap 5 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index bf8a95ffe..b5c346754 100644 +index 27a4dc6c8..4b2693f23 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1172,6 +1172,24 @@ uint64_t WalletImpl::unlockedBalance(uint32_t accountIndex) const @@ -166,5 +166,5 @@ index 009dce766..294a2d1f6 100644 std::map balance_per_subaddress(uint32_t subaddr_index_major, bool strict) const; std::map>> unlocked_balance_per_subaddress(uint32_t subaddr_index_major, bool strict); -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0005-coin-control.patch b/patches/wownero/0005-coin-control.patch index f473df6..c0f9e54 100644 --- a/patches/wownero/0005-coin-control.patch +++ b/patches/wownero/0005-coin-control.patch @@ -1,7 +1,7 @@ -From f2484ecd2a8255fab9613cce346ee3c24f4a6ba6 Mon Sep 17 00:00:00 2001 +From 0b17875257270149c5de45c2f43bab723a3905b7 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 27 Mar 2024 16:31:36 +0100 -Subject: [PATCH 5/9] coin control +Subject: [PATCH 05/14] coin control --- src/wallet/api/coins.cpp | 62 ++++++++++++++++++++++++++++++++++++ @@ -118,7 +118,7 @@ index 3293d8ae9..bcd8b517f 100644 WalletImpl *m_wallet; std::vector m_rows; diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index b5c346754..2dad8bc61 100644 +index 4b2693f23..ed309de34 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2018,11 +2018,11 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector Date: Tue, 26 Mar 2024 09:44:54 +0100 -Subject: [PATCH 6/9] fix build +Subject: [PATCH 06/14] fix build --- contrib/depends/hosts/linux.mk | 8 +++---- @@ -133,5 +133,5 @@ index 000000000..f05cb2b6a + #else + #ifdef POLYSEED_SHARED -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0007-macos-build-fix.patch b/patches/wownero/0007-macos-build-fix.patch index a92dd24..a484994 100644 --- a/patches/wownero/0007-macos-build-fix.patch +++ b/patches/wownero/0007-macos-build-fix.patch @@ -1,13 +1,13 @@ -From 77b40bb52771655dcf5a9c926faf12738f8f0e55 Mon Sep 17 00:00:00 2001 +From 86421c3f08ba92f02bb4f484dff2e9710dfd3cd2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 28 Mar 2024 02:03:08 +0100 -Subject: [PATCH 7/9] macos build fix +Subject: [PATCH 07/14] macos build fix --- contrib/depends/hosts/darwin.mk | 2 + contrib/depends/packages/polyseed.mk | 13 +++-- - .../polyseed/0001-disable-soname.patch | 49 +++++++++++++++++++ - 3 files changed, 60 insertions(+), 4 deletions(-) + .../polyseed/0001-disable-soname.patch | 48 +++++++++++++++++++ + 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 contrib/depends/patches/polyseed/0001-disable-soname.patch diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk @@ -57,10 +57,10 @@ index 2ddeac621..0071b20f3 100644 define $(package)_stage_cmds 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..a261636e8 +index 000000000..bd97dd394 --- /dev/null +++ b/contrib/depends/patches/polyseed/0001-disable-soname.patch -@@ -0,0 +1,49 @@ +@@ -0,0 +1,48 @@ +From aabafcfc0572651436d024a635483c49042fad7f Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto +Date: Thu, 28 Mar 2024 00:32:51 +0100 @@ -81,7 +81,7 @@ index 000000000..a261636e8 ++ 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) @@ -89,7 +89,7 @@ index 000000000..a261636e8 ++ NO_SONAME 1 + C_STANDARD 11 + C_STANDARD_REQUIRED ON) -+ ++ +-add_executable(polyseed-tests +- tests/tests.c) +-include_directories(polyseed-tests @@ -104,12 +104,11 @@ index 000000000..a261636e8 ++# 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 -+ -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0008-FIX-wallet-listener-crashing.patch b/patches/wownero/0008-FIX-wallet-listener-crashing.patch index b9a2385..8b05028 100644 --- a/patches/wownero/0008-FIX-wallet-listener-crashing.patch +++ b/patches/wownero/0008-FIX-wallet-listener-crashing.patch @@ -1,14 +1,14 @@ -From 370176c45e1037aa7c0413c07a59de3f220e0d93 Mon Sep 17 00:00:00 2001 +From 670e314c2737300ea618d7e3f51779af9e5009d2 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 2 Apr 2024 11:56:09 +0200 -Subject: [PATCH 8/9] FIX: wallet listener crashing +Subject: [PATCH 08/14] FIX: wallet listener crashing --- src/wallet/api/wallet.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 2dad8bc61..bb66e2bfd 100644 +index ed309de34..ee0eeeb01 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -201,8 +201,11 @@ struct Wallet2CallbackImpl : public tools::i_wallet2_callback @@ -54,5 +54,5 @@ index 2dad8bc61..bb66e2bfd 100644 virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx) -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch index c9cc888..6b43164 100644 --- a/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch +++ b/patches/wownero/0009-fix-missing-___clear_cache-when-targetting-iOS.patch @@ -1,33 +1,25 @@ -From d715a59a5760fa5b98ffb16678973ef5907462c3 Mon Sep 17 00:00:00 2001 +From ecdae80357168d532bc7625f337c6dff8b24939e Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Tue, 2 Apr 2024 17:07:19 +0200 -Subject: [PATCH 9/9] fix missing ___clear_cache when targetting iOS +Subject: [PATCH 09/14] fix missing ___clear_cache when targetting iOS --- - .gitmodules | 4 ++-- - external/randomwow | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + .gitmodules | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules -index 1c469941e..fa54f48b1 100644 +index bd30f0444..fa54f48b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,6 +20,6 @@ branch = monero [submodule "external/randomwow"] path = external/randomwow -- url = https://git.wownero.com/wownero/RandomWOW +- url = https://github.com/wownero-mirror/RandomWOW - branch = 1.2.1-wow + url = https://github.com/mrcyjanek/RandomWOW + branch = cyjan-fix-ios -diff --git a/external/randomwow b/external/randomwow -index 27b099b6d..6f30d4b92 160000 ---- a/external/randomwow -+++ b/external/randomwow -@@ -1 +1 @@ --Subproject commit 27b099b6dd6fef6e17f58c6dfe00009e9c5df587 -+Subproject commit 6f30d4b924fecb231e5b683915cc75d18b3b5866 -- -2.44.0 +2.39.2 diff --git a/patches/wownero/0010-build-wownero-seed.patch b/patches/wownero/0010-build-wownero-seed.patch index 99c94b5..a393697 100644 --- a/patches/wownero/0010-build-wownero-seed.patch +++ b/patches/wownero/0010-build-wownero-seed.patch @@ -1,7 +1,7 @@ -From ffa7b0f65d40e941c05940e70fe278493c48d594 Mon Sep 17 00:00:00 2001 +From 6c94fb26ef4d87ceb53cdcf9fb372bc3420e9db9 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 25 Apr 2024 10:06:04 +0200 -Subject: [PATCH] build wownero-seed +Subject: [PATCH 10/14] build wownero-seed --- contrib/depends/hosts/android.mk | 3 +- @@ -9,8 +9,8 @@ Subject: [PATCH] build wownero-seed 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 | 498 ++++++++++++++++++ - 6 files changed, 540 insertions(+), 2 deletions(-) + .../0001-fix-duplicate-symbol-error.patch | 497 ++++++++++++++++++ + 6 files changed, 539 insertions(+), 2 deletions(-) create mode 100644 contrib/depends/packages/wownero_seed.mk create mode 100644 contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch @@ -107,10 +107,10 @@ index 000000000..b376f80c5 +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..1969f3f23 +index 000000000..a8f8fe059 --- /dev/null +++ b/contrib/depends/patches/wownero_seed/0001-fix-duplicate-symbol-error.patch -@@ -0,0 +1,498 @@ +@@ -0,0 +1,497 @@ +From 4be93209afb80b11834a0849391ee6eeb68aec4a Mon Sep 17 00:00:00 2001 +From: Czarek Nakamoto +Date: Thu, 25 Apr 2024 09:37:37 +0200 @@ -131,36 +131,36 @@ index 000000000..1969f3f23 +--- 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 @@ -177,7 +177,7 @@ index 000000000..1969f3f23 + */ + 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() @@ -191,7 +191,7 @@ index 000000000..1969f3f23 ++++ 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, @@ -204,12 +204,12 @@ index 000000000..1969f3f23 ++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 @@ -218,38 +218,38 @@ index 000000000..1969f3f23 +@@ -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); @@ -267,25 +267,25 @@ index 000000000..1969f3f23 +@@ -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) { @@ -293,7 +293,7 @@ index 000000000..1969f3f23 + 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) { @@ -305,19 +305,19 @@ index 000000000..1969f3f23 + 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))); @@ -342,7 +342,7 @@ index 000000000..1969f3f23 + 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, @@ -352,7 +352,7 @@ index 000000000..1969f3f23 + 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, @@ -366,7 +366,7 @@ index 000000000..1969f3f23 +@@ -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) { @@ -374,26 +374,26 @@ index 000000000..1969f3f23 + 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; ++ 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) { @@ -402,7 +402,7 @@ index 000000000..1969f3f23 +@@ -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; @@ -411,7 +411,7 @@ index 000000000..1969f3f23 +@@ -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) { @@ -420,89 +420,89 @@ index 000000000..1969f3f23 +@@ -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]; */ @@ -513,26 +513,26 @@ index 000000000..1969f3f23 + 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 @@ -540,7 +540,7 @@ index 000000000..1969f3f23 + */ +-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); @@ -559,7 +559,7 @@ index 000000000..1969f3f23 + */ +-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 @@ -573,7 +573,7 @@ index 000000000..1969f3f23 + */ +-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); @@ -582,7 +582,7 @@ index 000000000..1969f3f23 + */ +-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, @@ -591,14 +591,14 @@ index 000000000..1969f3f23 + */ +-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. @@ -606,9 +606,8 @@ index 000000000..1969f3f23 + * @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.25.1 +2.39.2 diff --git a/patches/wownero/0011-android-ndk-version-bump.patch b/patches/wownero/0011-android-ndk-version-bump.patch index 35d3c2f..192b776 100644 --- a/patches/wownero/0011-android-ndk-version-bump.patch +++ b/patches/wownero/0011-android-ndk-version-bump.patch @@ -1,7 +1,7 @@ -From ee4e13b1cbd9cd5c5a1eea14415c758d89a5062f Mon Sep 17 00:00:00 2001 +From 8918f1a30ace05044a0e72a7bd661880e2ada35e Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 23 May 2024 08:02:49 +0200 -Subject: [PATCH] android ndk version bump +Subject: [PATCH 11/14] android ndk version bump --- contrib/depends/hosts/android.mk | 16 +++++++++++++--- diff --git a/patches/wownero/0012-rename-arm-armv7a.patch b/patches/wownero/0012-rename-arm-armv7a.patch index 6ba41ea..9a2e53f 100644 --- a/patches/wownero/0012-rename-arm-armv7a.patch +++ b/patches/wownero/0012-rename-arm-armv7a.patch @@ -1,7 +1,7 @@ -From 6b931c1af6965b3da03b795e711b87eaaec17838 Mon Sep 17 00:00:00 2001 +From ed6bcc39821f50fc42914c60133f3773b934d9a1 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 12 Jun 2024 15:48:01 +0200 -Subject: [PATCH] rename arm -> armv7a +Subject: [PATCH 12/14] rename arm -> armv7a --- contrib/depends/hosts/android.mk | 2 +- diff --git a/patches/wownero/0013-use-proper-error-handling-in-get_seed.patch b/patches/wownero/0013-use-proper-error-handling-in-get_seed.patch index 892a827..c0f7b8c 100644 --- a/patches/wownero/0013-use-proper-error-handling-in-get_seed.patch +++ b/patches/wownero/0013-use-proper-error-handling-in-get_seed.patch @@ -1,7 +1,7 @@ -From 50e09195fcb79debf5951c69717b9d4f239ed8e1 Mon Sep 17 00:00:00 2001 +From 08c9a02339ceda7d033dbffd9e0093f1cacea6ec Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 24 Jun 2024 10:49:12 +0200 -Subject: [PATCH] use proper error handling in get_seed +Subject: [PATCH 13/14] use proper error handling in get_seed --- src/wallet/api/wallet.cpp | 17 ++++++++++++----- @@ -9,10 +9,10 @@ Subject: [PATCH] use proper error handling in get_seed 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index ac3e6d51e..8bdd75a5a 100644 +index ee0eeeb01..02cf7c79b 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp -@@ -880,12 +880,19 @@ bool WalletImpl::close(bool store) +@@ -879,12 +879,19 @@ bool WalletImpl::close(bool store) std::string WalletImpl::seed(const std::string& seed_offset) const { @@ -38,10 +38,10 @@ index ac3e6d51e..8bdd75a5a 100644 bool WalletImpl::getPolyseed(std::string &seed_words, std::string &passphrase) const diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp -index 23b56810e..f7bdf2429 100644 +index 2b3eaad2e..4073974d9 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp -@@ -1452,11 +1452,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab +@@ -1445,11 +1445,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab bool keys_deterministic = is_deterministic(); if (!keys_deterministic) { @@ -55,7 +55,7 @@ index 23b56810e..f7bdf2429 100644 std::cout << "seed_language not set" << std::endl; return false; } -@@ -1466,6 +1468,7 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab +@@ -1459,6 +1461,7 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab key = cryptonote::encrypt_key(key, passphrase); if (!crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language)) { diff --git a/patches/wownero/0014-store-crash-fix.patch b/patches/wownero/0014-store-crash-fix.patch index b55643d..40875ac 100644 --- a/patches/wownero/0014-store-crash-fix.patch +++ b/patches/wownero/0014-store-crash-fix.patch @@ -1,7 +1,7 @@ -From 286acdf6951194536ead88de80a7940b320bd056 Mon Sep 17 00:00:00 2001 +From 584cf058ca441a46aa054d2d401b20f31ff7732e Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Sat, 11 May 2024 16:25:10 +0200 -Subject: [PATCH] store crash fix +Subject: [PATCH 14/14] store crash fix Monero wallet crashes (sometimes) when it is syncing, while the proper solution (that can be seen in feather) @@ -43,7 +43,7 @@ the current state. 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp -index 04f278e15..29339207f 100644 +index 02cf7c79b..b416c9535 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -57,8 +57,8 @@ using namespace cryptonote;