From 7f80d0773f9f19e6d0c1c9af1797e700e42e85ce Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 21 Oct 2024 16:39:14 +0200 Subject: fix polyseed patch --- ...et-background-sync-with-just-the-view-key.patch | 2 +- patches/monero/0002-store-crash-fix.patch | 2 +- patches/monero/0003-Update-android-ndk.patch | 2 +- .../0004-uint64_t-missing-definition-fix.patch | 2 +- ...005-use-proper-error-handling-in-get_seed.patch | 2 +- patches/monero/0006-UR-functions.patch | 2 +- .../monero/0007-add-dummy-device-for-ledger.patch | 2 +- patches/monero/0008-polyseed.patch | 164 +++++++++++++++++---- patches/monero/0009-coin-control.patch | 2 +- ...oding-and-tx-key-getter-for-PendingTransc.patch | 2 +- ...dd-recoverDeterministicWalletFromSpendKey.patch | 2 +- 11 files changed, 148 insertions(+), 36 deletions(-) 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 c9fc999..df2d589 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,4 +1,4 @@ -From 958a56330836f5185a29d022a6696956ec78a8d6 Mon Sep 17 00:00:00 2001 +From 69edb14a59d5c1d77700c08c2828f767dc7de432 Mon Sep 17 00:00:00 2001 From: j-berman Date: Thu, 13 Oct 2022 18:33:33 -0700 Subject: [PATCH 01/11] wallet: background sync with just the view key diff --git a/patches/monero/0002-store-crash-fix.patch b/patches/monero/0002-store-crash-fix.patch index 89c353c..fd0b303 100644 --- a/patches/monero/0002-store-crash-fix.patch +++ b/patches/monero/0002-store-crash-fix.patch @@ -1,4 +1,4 @@ -From a671dfe3e4d4723942f87a57a70a1a42f778cb4c Mon Sep 17 00:00:00 2001 +From ee0a1d2341b3648f975000bdad5f19b46a41cee0 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Sat, 11 May 2024 16:25:10 +0200 Subject: [PATCH 02/11] store crash fix diff --git a/patches/monero/0003-Update-android-ndk.patch b/patches/monero/0003-Update-android-ndk.patch index 1f3df97..f6cc68d 100644 --- a/patches/monero/0003-Update-android-ndk.patch +++ b/patches/monero/0003-Update-android-ndk.patch @@ -1,4 +1,4 @@ -From e2526a2a08b96dd75f8c9effe475dd15156c743e Mon Sep 17 00:00:00 2001 +From 86f4d00f1c40a92c3ae2265f27be1568a8a54c81 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 23 May 2024 08:02:49 +0200 Subject: [PATCH 03/11] Update android ndk diff --git a/patches/monero/0004-uint64_t-missing-definition-fix.patch b/patches/monero/0004-uint64_t-missing-definition-fix.patch index b46d0dc..4793742 100644 --- a/patches/monero/0004-uint64_t-missing-definition-fix.patch +++ b/patches/monero/0004-uint64_t-missing-definition-fix.patch @@ -1,4 +1,4 @@ -From e8ca4e1446ad16c7ce2a5df26bb9c0e06dfa8b1e Mon Sep 17 00:00:00 2001 +From 371fb3ba0e0fdd9d84daad1b6dddf78e6e54a6cc Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 2 Sep 2024 16:40:31 +0200 Subject: [PATCH 04/11] uint64_t missing definition fix diff --git a/patches/monero/0005-use-proper-error-handling-in-get_seed.patch b/patches/monero/0005-use-proper-error-handling-in-get_seed.patch index 92602de..8c42d27 100644 --- a/patches/monero/0005-use-proper-error-handling-in-get_seed.patch +++ b/patches/monero/0005-use-proper-error-handling-in-get_seed.patch @@ -1,4 +1,4 @@ -From 234d235ad83de3d11631dc317f74abd640b472c4 Mon Sep 17 00:00:00 2001 +From e5efe5789f2338cd6bcc49f25b6ab5aab0f0d657 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 24 Jun 2024 10:49:12 +0200 Subject: [PATCH 05/11] use proper error handling in get_seed diff --git a/patches/monero/0006-UR-functions.patch b/patches/monero/0006-UR-functions.patch index e2b08f4..d7d6d0f 100644 --- a/patches/monero/0006-UR-functions.patch +++ b/patches/monero/0006-UR-functions.patch @@ -1,4 +1,4 @@ -From a6672235422519749ffec4d20cfce6c418863a1c Mon Sep 17 00:00:00 2001 +From a250a9695b3a374d46a2e93894fb0c0619a994b3 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 10:09:50 +0100 Subject: [PATCH 06/11] UR functions diff --git a/patches/monero/0007-add-dummy-device-for-ledger.patch b/patches/monero/0007-add-dummy-device-for-ledger.patch index af812dc..54335cd 100644 --- a/patches/monero/0007-add-dummy-device-for-ledger.patch +++ b/patches/monero/0007-add-dummy-device-for-ledger.patch @@ -1,4 +1,4 @@ -From b1aa9f60da16ea296e524a0b9966f1a5f794bf48 Mon Sep 17 00:00:00 2001 +From 191cf0f700839d327eab24eaae4635818bb21bae Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 26 Jun 2024 15:04:38 +0200 Subject: [PATCH 07/11] add dummy device for ledger diff --git a/patches/monero/0008-polyseed.patch b/patches/monero/0008-polyseed.patch index f291945..4399653 100644 --- a/patches/monero/0008-polyseed.patch +++ b/patches/monero/0008-polyseed.patch @@ -1,35 +1,42 @@ -From cf9e1b3b6a2baed010b8b2e4479666b733322ba0 Mon Sep 17 00:00:00 2001 +From 47c473f8680e0df31d3d8c3282b5f9fa51448d76 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 09:42:37 +0100 Subject: [PATCH 08/11] polyseed Co-authored-by: Czarek Nakamoto --- - .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(-) + .gitmodules | 6 + + CMakeLists.txt | 4 +- + contrib/depends/hosts/linux.mk | 8 +- + contrib/depends/packages/packages.mk | 2 +- + contrib/depends/packages/polyseed.mk | 23 +++ + contrib/depends/packages/sodium.mk | 2 +- + .../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 | 100 ++++++++-- + src/wallet/wallet2.h | 30 ++- + 29 files changed, 857 insertions(+), 24 deletions(-) + create mode 100644 contrib/depends/packages/polyseed.mk + create mode 100644 contrib/depends/patches/polyseed/force-static-mingw.patch create mode 160000 external/polyseed create mode 160000 external/utf8proc create mode 100644 src/polyseed/CMakeLists.txt @@ -77,6 +84,111 @@ index 43ef6cd20..e7fa90abb 100644 if(APPLE) cmake_policy(SET CMP0042 NEW) +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..2ddeac621 +--- /dev/null ++++ b/contrib/depends/packages/polyseed.mk +@@ -0,0 +1,23 @@ ++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 ++ ++define $(package)_preprocess_cmds ++ patch -p1 < $($(package)_patch_dir)/force-static-mingw.patch ++endef ++ ++define $(package)_config_cmds ++ cmake -DCMAKE_INSTALL_PREFIX=$(host_prefix) -DCMAKE_C_COMPILER=$($(package)_cc) . ++endef ++ ++define $(package)_build_cmds ++ $(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/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 --- a/contrib/epee/include/wipeable_string.h diff --git a/patches/monero/0009-coin-control.patch b/patches/monero/0009-coin-control.patch index bbdd3e0..e44b450 100644 --- a/patches/monero/0009-coin-control.patch +++ b/patches/monero/0009-coin-control.patch @@ -1,4 +1,4 @@ -From 91e4dbbd5dc70012a6c0d87f3932e4c84428bf2f Mon Sep 17 00:00:00 2001 +From 972d5165e1b09929e432146fbe4585046341b38f Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 12 Mar 2024 11:07:57 +0100 Subject: [PATCH 09/11] coin control diff --git a/patches/monero/0010-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 ac7d366..1b1304e 100644 --- a/patches/monero/0010-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,4 +1,4 @@ -From c596464532d07615bdbcaa4ba9e719179e167944 Mon Sep 17 00:00:00 2001 +From 6f3fc7aca64cca815992d33d6ca606e2a8f7d230 Mon Sep 17 00:00:00 2001 From: M Date: Fri, 21 Apr 2023 15:43:47 -0400 Subject: [PATCH 10/11] Add hex encoding and tx key getter for diff --git a/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch index 2b8a712..801ab2b 100644 --- a/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch +++ b/patches/monero/0011-Add-recoverDeterministicWalletFromSpendKey.patch @@ -1,4 +1,4 @@ -From 9f2485a34746bfc4dda29a82153a89103f4c5340 Mon Sep 17 00:00:00 2001 +From feaa18195d914163254add690d230137c4962e5b Mon Sep 17 00:00:00 2001 From: Konstantin Ullrich Date: Wed, 11 Oct 2023 16:47:59 +0200 Subject: [PATCH 11/11] Add recoverDeterministicWalletFromSpendKey -- cgit v1.2.3