From 2865a06e6a0122b83894bd33ceb7de7d4da2eb9e Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Wed, 25 Oct 2023 18:41:50 +0300 Subject: [PATCH 01/10] cmake: boost version checker cherry-picked from Monero --- CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9230cb36..4da198430 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -921,13 +921,19 @@ find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_ set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) if(NOT Boost_FOUND) - die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (1.58) or the equivalent") + die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=1.58) or the equivalent") elseif(Boost_FOUND) message(STATUS "Found Boost Version: ${Boost_VERSION}") - if (Boost_VERSION VERSION_LESS 106200 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1)) - message(FATAL_ERROR "Boost older than 1.62 is too old to link with OpenSSL 1.1 or newer. " + if (Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 1.62.0 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1)) + set(BOOST_BEFORE_1_62 true) + endif() + if (NOT Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 106200 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1)) + set(BOOST_BEFORE_1_62 true) + endif() + if (BOOST_BEFORE_1_62) + message(FATAL_ERROR "Boost ${Boost_VERSION} (older than 1.62) is too old to link with OpenSSL ${OPENSSL_VERSION} (1.1 or newer) found at ${OPENSSL_INCLUDE_DIR} and ${OPENSSL_LIBRARIES}. " "Update Boost or install OpenSSL 1.0 and set path to it when running cmake: " - "cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0;/usr/lib/openssl-1.0'") + "cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0'") endif() endif() From 15b1d3ce3238ac9272bcb7046d57d04a18441be5 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Wed, 25 Oct 2023 18:48:53 +0300 Subject: [PATCH 02/10] Updated mainnet seednodes --- src/p2p/net_node.inl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 412a7d8c9..7beb98005 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -497,9 +497,12 @@ namespace nodetool } else { - full_addrs.insert("109.74.204.179:18980"); - full_addrs.insert("45.79.42.116:18980"); - full_addrs.insert("207.148.153.14:18980"); + full_addrs.insert("213.56.136.124:18980"); // community seed-node #1 + full_addrs.insert("207.180.254.198:18980"); // community seed-node #2 + full_addrs.insert("82.69.122.59:18980"); // community seed-node #3 + full_addrs.insert("78.29.36.45:18980"); // community seed-node #4 + full_addrs.insert("45.118.134.99:18980"); // graft seed-node #3 + } return full_addrs; } From 6536d707f2bbf359e76c2c95f0cf5d1dd39c9a0b Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Wed, 25 Oct 2023 18:55:35 +0300 Subject: [PATCH 03/10] version bump --- src/version.cpp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.cpp.in b/src/version.cpp.in index 0896bd700..16504a6cb 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_GRAFT_VERSION_TAG "@VERSIONTAG@" -#define DEF_GRAFT_VERSION "1.10.0" +#define DEF_GRAFT_VERSION "1.11.0" #define DEF_GRAFT_RELEASE_NAME "Vela Pulsar" #define DEF_GRAFT_VERSION_FULL DEF_GRAFT_VERSION "-" DEF_GRAFT_VERSION_TAG From c3c41c6b12561a3a46262059f8aa3f2c9e4a6655 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 21 Mar 2019 11:01:15 +0000 Subject: [PATCH 04/10] epee: fix build with boost 1.70.0 get_io_service was deprecated, and got removed --- contrib/epee/include/net/abstract_tcp_server2.inl | 14 ++++++++++---- contrib/epee/src/connection_basic.cpp | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl index c5811012d..953b88b47 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.inl +++ b/contrib/epee/include/net/abstract_tcp_server2.inl @@ -60,6 +60,12 @@ #define DEFAULT_TIMEOUT_MS_REMOTE 300000 // 5 minutes #define TIMEOUT_EXTRA_MS_PER_BYTE 0.2 +#if BOOST_VERSION >= 107000 +#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context()) +#else +#define GET_IO_SERVICE(s) ((s).get_io_service()) +#endif + PRAGMA_WARNING_PUSH namespace epee { @@ -85,7 +91,7 @@ PRAGMA_WARNING_DISABLE_VS(4355) m_connection_type( connection_type ), m_throttle_speed_in("speed_in", "throttle_speed_in"), m_throttle_speed_out("speed_out", "throttle_speed_out"), - m_timer(io_service), + m_timer(GET_IO_SERVICE(socket_)), m_local(false), m_ready_to_close(false) { @@ -215,7 +221,7 @@ PRAGMA_WARNING_DISABLE_VS(4355) template boost::asio::io_service& connection::get_io_service() { - return socket_.get_io_service(); + return GET_IO_SERVICE(socket()); } //--------------------------------------------------------------------------------- template @@ -385,7 +391,7 @@ PRAGMA_WARNING_DISABLE_VS(4355) if(!m_is_multithreaded) { //single thread model, we can wait in blocked call - size_t cnt = socket_.get_io_service().run_one(); + size_t cnt = GET_IO_SERVICE(socket()).run_one(); if(!cnt)//service is going to quit return false; }else @@ -395,7 +401,7 @@ PRAGMA_WARNING_DISABLE_VS(4355) //if no handlers were called //TODO: Maybe we need to have have critical section + event + callback to upper protocol to //ask it inside(!) critical region if we still able to go in event wait... - size_t cnt = socket_.get_io_service().poll_one(); + size_t cnt = GET_IO_SERVICE(socket()).poll_one(); if(!cnt) misc_utils::sleep_no_w(0); } diff --git a/contrib/epee/src/connection_basic.cpp b/contrib/epee/src/connection_basic.cpp index 704d417ae..dbfc9c2cf 100644 --- a/contrib/epee/src/connection_basic.cpp +++ b/contrib/epee/src/connection_basic.cpp @@ -79,6 +79,12 @@ // TODO: #include "net/network_throttle-detail.hpp" +#if BOOST_VERSION >= 107000 +#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context()) +#else +#define GET_IO_SERVICE(s) ((s).get_io_service()) +#endif + #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" From 984c3a22ee58edada9c9b06ae24c4c1b9ef7a117 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Wed, 15 Nov 2023 13:58:57 +0300 Subject: [PATCH 05/10] Boost/CMake fix from Monero --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4da198430..6e8c11a51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -909,6 +909,7 @@ if (${BOOST_IGNORE_SYSTEM_PATHS} STREQUAL "ON") endif() set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +set(Boost_NO_BOOST_CMAKE ON) if(STATIC) if(MINGW) set(CMAKE_FIND_LIBRARY_SUFFIXES .a) From e9b1c42e0d36ebc63c91351beba59ba602303556 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 8 Jun 2019 15:58:33 +0000 Subject: [PATCH 06/10] Fix GCC 9.1 build warnings GCC wants operator= aand copy ctor to be both defined, or neither --- contrib/epee/include/net/net_utils_base.h | 5 +++++ src/device/device_ledger.cpp | 12 ++++++++++++ src/device/device_ledger.hpp | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/contrib/epee/include/net/net_utils_base.h b/contrib/epee/include/net/net_utils_base.h index a133942fb..0132ae95a 100644 --- a/contrib/epee/include/net/net_utils_base.h +++ b/contrib/epee/include/net/net_utils_base.h @@ -257,6 +257,11 @@ namespace net_utils m_current_speed_up(0) {} + connection_context_base(const connection_context_base& a): connection_context_base() + { + set_details(a.m_connection_id, a.m_remote_address, a.m_is_income); + } + connection_context_base& operator=(const connection_context_base& a) { set_details(a.m_connection_id, a.m_remote_address, a.m_is_income); diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index a17784960..e0f62d7dc 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -85,6 +85,18 @@ namespace hw { AKout = keys.AKout; } + ABPkeys &ABPkeys::operator=(const ABPkeys& keys) { + if (&keys == this) + return *this; + Aout = keys.Aout; + Bout = keys.Bout; + is_subaddress = keys.is_subaddress; + index = keys.index; + Pout = keys.Pout; + AKout = keys.AKout; + return *this; + } + bool Keymap::find(const rct::key& P, ABPkeys& keys) const { size_t sz = ABP.size(); for (size_t i=0; i Date: Thu, 17 Sep 2020 14:51:33 +0000 Subject: [PATCH 07/10] link libzmq against libgssapi_krb5 if found --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e8c11a51..ccb669dff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1005,6 +1005,8 @@ find_path(ZMQ_INCLUDE_PATH zmq.hpp) find_library(ZMQ_LIB zmq) find_library(PGM_LIBRARY pgm) find_library(NORM_LIBRARY norm) +find_library(GSSAPI_LIBRARY gssapi_krb5) +find_library(PROTOLIB_LIBRARY protolib) find_library(SODIUM_LIBRARY sodium) if(NOT ZMQ_INCLUDE_PATH) @@ -1019,6 +1021,12 @@ endif() if(NORM_LIBRARY) set(ZMQ_LIB "${ZMQ_LIB};${NORM_LIBRARY}") endif() +if(GSSAPI_LIBRARY) + set(ZMQ_LIB "${ZMQ_LIB};${GSSAPI_LIBRARY}") +endif() +if(PROTOLIB_LIBRARY) + set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}") +endif() if(SODIUM_LIBRARY) set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}") endif() From a00e7ad053a13dd2f277c3894cda76a34e2e71a5 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Thu, 16 Nov 2023 22:45:36 +0300 Subject: [PATCH 08/10] fix: build errors due new compiler ver --- src/simplewallet/simplewallet.cpp | 8 ++++---- src/wallet/graft_wallet.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a8caa3226..ede7b5cb9 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3685,7 +3685,7 @@ boost::optional simple_wallet::new_wallet(const boost::pr } success_msg_writer() << "**********************************************************************"; - return std::move(password); + return password; } //---------------------------------------------------------------------------------------------------- boost::optional simple_wallet::new_wallet(const boost::program_options::variables_map& vm, @@ -3732,7 +3732,7 @@ boost::optional simple_wallet::new_wallet(const boost::pr } - return std::move(password); + return password; } //---------------------------------------------------------------------------------------------------- @@ -3770,7 +3770,7 @@ boost::optional simple_wallet::new_wallet(const boost::pr return {}; } - return std::move(password); + return password; } //---------------------------------------------------------------------------------------------------- boost::optional simple_wallet::new_wallet(const boost::program_options::variables_map& vm, @@ -3823,7 +3823,7 @@ boost::optional simple_wallet::new_wallet(const boost::pr return {}; } - return std::move(password); + return password; } //---------------------------------------------------------------------------------------------------- bool simple_wallet::open_wallet(const boost::program_options::variables_map& vm) diff --git a/src/wallet/graft_wallet.cpp b/src/wallet/graft_wallet.cpp index dc9af49bb..e827aba37 100644 --- a/src/wallet/graft_wallet.cpp +++ b/src/wallet/graft_wallet.cpp @@ -94,7 +94,7 @@ std::unique_ptr tools::GraftWallet::createWallet(const std:: { wallet->loadFromData(account_data, password, "" /*cache_file*/, use_base64); } - return std::move(wallet); + return wallet; } bool tools::GraftWallet::verify_message(const std::string &message, const std::string &address, From d53b4f21070970643e1fb2d8e8fc0ad93b95de6a Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Thu, 16 Nov 2023 23:21:30 +0300 Subject: [PATCH 09/10] add: one more community seed --- src/p2p/net_node.inl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 7beb98005..bda43c06d 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -501,6 +501,7 @@ namespace nodetool full_addrs.insert("207.180.254.198:18980"); // community seed-node #2 full_addrs.insert("82.69.122.59:18980"); // community seed-node #3 full_addrs.insert("78.29.36.45:18980"); // community seed-node #4 + full_addrs.insert("82.197.160.5:18980"); // community seed-node #5 full_addrs.insert("45.118.134.99:18980"); // graft seed-node #3 } From 96c3321e8a54c3aa280f1db576a71394cc59fb10 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Thu, 16 Nov 2023 23:21:59 +0300 Subject: [PATCH 10/10] fix: build error because empty test --- tests/unit_tests/keccak.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/unit_tests/keccak.cpp b/tests/unit_tests/keccak.cpp index 4276b0e1d..e2f6d8fdc 100644 --- a/tests/unit_tests/keccak.cpp +++ b/tests/unit_tests/keccak.cpp @@ -54,9 +54,6 @@ extern "C" { keccak_finish(&ctx, md1); \ ASSERT_EQ(memcmp(md0, md1, 32), 0); -TEST(keccak, ) -{ -} TEST(keccak, 0_and_0) {