From dc3c52ea73ad6d4f9af1c404e7acbf84a2a7cc46 Mon Sep 17 00:00:00 2001 From: OrsonJ <59993846+OrsonJ@users.noreply.github.com> Date: Fri, 5 Jun 2020 14:42:26 +0200 Subject: [PATCH 1/6] Update invalid Qt link in Linux Build Instructions (#179) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 151e15b5..8f9a5ad5 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Recommended OS version: Ubuntu 18.04 LTS. 3. Install Qt - wget https://download.qt.io/archive/qt/5.11/5.11.2/qt-opensource-linux-x64-5.11.2.run + wget https://download.qt.io/new_archive/qt/5.11/5.11.2/qt-opensource-linux-x64-5.11.2.run chmod +x qt-opensource-linux-x64-5.11.2.run ./qt-opensource-linux-x64-5.11.2.run Then follow the instructions in Wizard. Don't forget to tick WebEngine module! From 399c09871f9ef43b93d812e1032ccad2bc5b3362 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 22 Jul 2020 14:09:55 +0300 Subject: [PATCH 2/6] simplewallet: bring pulling error up to the user on refresh --- src/wallet/wallet2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 54be20a3..f7af74e5 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1877,12 +1877,16 @@ void wallet2::refresh(size_t & blocks_fetched, bool& received_money, std::atomic if (++try_count > 3) return; WLT_LOG_L2("no connection to the daemon, wait and try pull_blocks again (try_count: " << try_count << ", blocks_fetched: " << blocks_fetched << ")"); + if (m_wcallback) + m_wcallback->on_message(tools::i_wallet2_callback::ms_red, "no connection to daemon"); std::this_thread::sleep_for(std::chrono::seconds(3)); } catch (const std::exception& e) { blocks_fetched += added_blocks; WLT_LOG_ERROR("refresh->pull_blocks failed, try_count: " << try_count << ", blocks_fetched: " << blocks_fetched << ", exception: " << e.what()); + if (m_wcallback) + m_wcallback->on_message(tools::i_wallet2_callback::ms_red, std::string("error on pulling blocks: ") + e.what()); return; } } From 3e463b065caef650e413a2a025dbc8e7ecc435c3 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 22 Jul 2020 16:14:17 +0300 Subject: [PATCH 3/6] simplewallet improvements in tracking wallets area --- src/simplewallet/simplewallet.cpp | 26 +++++++++++++++----------- src/simplewallet/simplewallet.h | 2 +- src/wallet/wallet2.cpp | 6 +++--- src/wallet/wallet2.h | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index dfc55e9e..e78c336f 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -51,7 +51,7 @@ namespace const command_line::arg_descriptor arg_log_level = {"set-log", "", 0, true}; const command_line::arg_descriptor arg_do_pos_mining = { "do-pos-mining", "Do PoS mining", false, false }; const command_line::arg_descriptor arg_pos_mining_reward_address = { "pos-mining-reward-address", "Block reward will be sent to the giving address if specified", "" }; - const command_line::arg_descriptor arg_restore_wallet = { "restore-wallet", "Restore wallet from the seed phrase and save it to ", "" }; + const command_line::arg_descriptor arg_restore_wallet = { "restore-wallet", "Restore wallet from seed phrase or tracking seed and save it to ", "" }; const command_line::arg_descriptor arg_offline_mode = { "offline-mode", "Don't connect to daemon, work offline (for cold-signing process)", false, true }; const command_line::arg_descriptor< std::vector > arg_command = {"command", ""}; @@ -220,7 +220,7 @@ simple_wallet::simple_wallet() m_cmd_binder.set_handler("get_tx_key", boost::bind(&simple_wallet::get_tx_key, this, _1), "Get transaction one-time secret key (r) for a given "); - m_cmd_binder.set_handler("tracking_seed", boost::bind(&simple_wallet::tracking_seed, this, _1), "For auditable wallets: prints auditable watch-only blob for wallet's audit by a third party"); + m_cmd_binder.set_handler("tracking_seed", boost::bind(&simple_wallet::tracking_seed, this, _1), "For auditable wallets: prints tracking seed for wallet's audit by a third party"); m_cmd_binder.set_handler("save", boost::bind(&simple_wallet::save, this, _1), "Save wallet synchronized data"); m_cmd_binder.set_handler("save_watch_only", boost::bind(&simple_wallet::save_watch_only, this, _1), "save_watch_only - save as watch-only wallet file."); @@ -275,7 +275,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) if (m_wallet_file.empty() && m_generate_new.empty() && m_restore_wallet.empty() && m_generate_new_aw.empty()) { - fail_msg_writer() << "you must specify --wallet-file, --generate-new-wallet, --generate-new-auditable-wallet, --restore-wallet or --restore-awo-wallet"; + fail_msg_writer() << "you must specify --wallet-file, --generate-new-wallet, --generate-new-auditable-wallet, --restore-wallet"; return false; } @@ -331,7 +331,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) } tools::password_container restore_seed_container; - if (!restore_seed_container.read_password("please, enter wallet seed phrase or an auditable wallet tracking key:\n")) + if (!restore_seed_container.read_password("please, enter wallet seed phrase or an auditable wallet's tracking seed:\n")) { fail_msg_writer() << "failed to read seed phrase"; return false; @@ -420,7 +420,7 @@ bool simple_wallet::new_wallet(const string &wallet_file, const std::string& pas return true; } //---------------------------------------------------------------------------------------------------- -bool simple_wallet::restore_wallet(const std::string& wallet_file, const std::string& seed_or_tracking_seed, const std::string& password, bool auditable_watch_only) +bool simple_wallet::restore_wallet(const std::string& wallet_file, const std::string& seed_or_tracking_seed, const std::string& password, bool tracking_wallet) { m_wallet_file = wallet_file; @@ -429,24 +429,27 @@ bool simple_wallet::restore_wallet(const std::string& wallet_file, const std::st m_wallet->set_do_rise_transfer(true); try { - if (auditable_watch_only) + if (tracking_wallet) { + // auditable watch-only aka tracking wallet m_wallet->restore(epee::string_encoding::utf8_to_wstring(wallet_file), password, seed_or_tracking_seed, true); - message_writer(epee::log_space::console_color_white, true) << "Auditable watch-only wallet restored: " << m_wallet->get_account().get_public_address_str(); + message_writer(epee::log_space::console_color_white, true) << "Tracking wallet restored: " << m_wallet->get_account().get_public_address_str(); } else { - // normal wallet + // normal or auditable wallet m_wallet->restore(epee::string_encoding::utf8_to_wstring(wallet_file), password, seed_or_tracking_seed, false); - message_writer(epee::log_space::console_color_white, true) << "Wallet restored: " << m_wallet->get_account().get_public_address_str(); + message_writer(epee::log_space::console_color_white, true) << (m_wallet->is_auditable() ? "Auditable wallet" : "Wallet") << " restored: " << m_wallet->get_account().get_public_address_str(); std::cout << "view key: " << string_tools::pod_to_hex(m_wallet->get_account().get_keys().view_secret_key) << std::endl << std::flush; + if (m_wallet->is_auditable()) + std::cout << "tracking seed: " << std::endl << m_wallet->get_account().get_tracking_seed() << std::endl << std::flush; } if (m_do_not_set_date) m_wallet->reset_creation_time(0); } catch (const std::exception& e) { - fail_msg_writer() << "failed to restore wallet, check your " << (auditable_watch_only ? "awo blob!" : "seed phrase!") << ENDL << e.what(); + fail_msg_writer() << "failed to restore wallet, check your " << (tracking_wallet ? "tracking seed!" : "seed phrase!") << ENDL << e.what(); return false; } @@ -459,7 +462,7 @@ bool simple_wallet::restore_wallet(const std::string& wallet_file, const std::st "Use \"help\" command to see the list of available commands.\n" << "Always use \"exit\" command when closing simplewallet to save\n" << "current session's state. Otherwise, you will possibly need to synchronize \n" << - "your wallet again. Your wallet key is NOT under risk anyway.\n" << + "your wallet again. Your wallet keys is NOT under risk anyway.\n" << "**********************************************************************"; return true; } @@ -1493,6 +1496,7 @@ bool simple_wallet::tracking_seed(const std::vector &args_) success_msg_writer() << "Auditable watch-only tracking seed for this wallet is:"; std::cout << m_wallet->get_account().get_tracking_seed() << ENDL; + success_msg_writer() << "Anyone having this tracking seed is able to watch your balance and transaction history, but unable to spend coins."; return true; } //---------------------------------------------------------------------------------------------------- diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 42862a59..051201b0 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -46,7 +46,7 @@ namespace currency bool new_wallet(const std::string &wallet_file, const std::string& password, bool create_auditable_wallet); bool open_wallet(const std::string &wallet_file, const std::string& password); - bool restore_wallet(const std::string& wallet_file, const std::string& seed_or_tracking_seed, const std::string& password, bool auditable_watch_only); + bool restore_wallet(const std::string& wallet_file, const std::string& seed_or_tracking_seed, const std::string& password, bool tracking_wallet); bool close_wallet(); bool help(const std::vector &args = std::vector()); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f7af74e5..64e1d0e1 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2298,18 +2298,18 @@ void wallet2::generate(const std::wstring& path, const std::string& pass, bool a store(); } //---------------------------------------------------------------------------------------------------- -void wallet2::restore(const std::wstring& path, const std::string& pass, const std::string& seed_or_tracking_seed, bool auditable_watch_only) +void wallet2::restore(const std::wstring& path, const std::string& pass, const std::string& seed_or_tracking_seed, bool tracking_wallet) { bool r = false; clear(); prepare_file_names(path); m_password = pass; - if (auditable_watch_only) + if (tracking_wallet) { r = m_account.restore_from_tracking_seed(seed_or_tracking_seed); init_log_prefix(); - WLT_THROW_IF_FALSE_WALLET_CMN_ERR_EX(r, "Could not load auditable watch-only wallet from a given blob: invalid awo blob"); + WLT_THROW_IF_FALSE_WALLET_CMN_ERR_EX(r, "Could not load tracking wallet from a given seed: invalid tracking seed"); m_watch_only = true; } else diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index c3ab9d66..65400b88 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -466,7 +466,7 @@ namespace tools void assign_account(const currency::account_base& acc); void generate(const std::wstring& path, const std::string& password, bool auditable_wallet); - void restore(const std::wstring& path, const std::string& pass, const std::string& seed_or_tracking_seed, bool auditable_watch_only); + void restore(const std::wstring& path, const std::string& pass, const std::string& seed_or_tracking_seed, bool tracking_wallet); void load(const std::wstring& path, const std::string& password); void store(); void store(const std::wstring& path); From 68ffae815af26c4d3bed910eb1c9e32926f2bd65 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 22 Jul 2020 20:08:04 +0300 Subject: [PATCH 4/6] simplewallet: print a tracking seed when auditable wallet is created --- src/simplewallet/simplewallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index e78c336f..c37fef0a 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -395,6 +395,8 @@ bool simple_wallet::new_wallet(const string &wallet_file, const std::string& pas m_wallet->generate(epee::string_encoding::utf8_to_wstring(m_wallet_file), password, create_auditable_wallet); message_writer(epee::log_space::console_color_white, true) << "Generated new " << (create_auditable_wallet ? "AUDITABLE" : "") << " wallet: " << m_wallet->get_account().get_public_address_str(); std::cout << "view key: " << string_tools::pod_to_hex(m_wallet->get_account().get_keys().view_secret_key) << std::endl << std::flush; + if (m_wallet->is_auditable()) + std::cout << "tracking seed: " << std::endl << m_wallet->get_account().get_tracking_seed() << std::endl << std::flush; if (m_do_not_set_date) m_wallet->reset_creation_time(0); From beb56a10bb0bba62068eb1b629b55958e281cf9d Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 22 Jul 2020 20:09:47 +0300 Subject: [PATCH 5/6] testnet: new checkpoint and predownload files --- src/common/pre_download.h | 4 ++-- src/currency_core/checkpoints_create.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/pre_download.h b/src/common/pre_download.h index 38386a20..e40e26ef 100644 --- a/src/common/pre_download.h +++ b/src/common/pre_download.h @@ -24,8 +24,8 @@ namespace tools static constexpr pre_download_entry c_pre_download_lmdb = { "http://95.217.43.225/pre-download/zano_lmdb_94_599999.pak", "6ab4f17cb9252f5cb576e8b212b5b95ad4b3e801a9612de574d7d01204777830", 1023060357, 1491427328 }; static constexpr pre_download_entry c_pre_download_mdbx = { "http://95.217.43.225/pre-download/zano_mdbx_94_599999.pak", "7cf41d2881fa4002a159974d988a0c605ccb801888b18f0352c9a94586c9f935", 795428926, 1610588160 }; #else - static constexpr pre_download_entry c_pre_download_lmdb = { "http://95.217.43.225/pre-download/zano_testnet_lmdb_96_349999.pak", "300a52c4c681f3d01f9d52eaca0461397a13d5507fc56438e18c3dfcb9459ebb", 345490545, 506789888 }; - static constexpr pre_download_entry c_pre_download_mdbx = { "http://95.217.43.225/pre-download/zano_testnet_mdbx_96_349999.pak", "0a3e56e915fde6b0b656014909f91726489f9478b04d39d7f4ac30fd49732909", 253066780, 536862720 }; + static constexpr pre_download_entry c_pre_download_lmdb = { "http://95.217.43.225/pre-download/zano_testnet_lmdb_97_449999.pak", "923b5c59359807b7e375e34cdf9327216c34ab71550669f9535a552c441b285a", 427062309, 641089536 }; + static constexpr pre_download_entry c_pre_download_mdbx = { "http://95.217.43.225/pre-download/zano_testnet_mdbx_97_449999.pak", "ab8b9e9fdedbf47dcbc01c7816191951f3b154b1eb7e5dd0da3df0872e0cd80a", 308152196, 805294080 }; #endif static constexpr uint64_t pre_download_min_size_difference = 512 * 1024 * 1024; // minimum difference in size between local DB and the downloadable one to start downloading diff --git a/src/currency_core/checkpoints_create.h b/src/currency_core/checkpoints_create.h index 21c296ba..d1a16a32 100644 --- a/src/currency_core/checkpoints_create.h +++ b/src/currency_core/checkpoints_create.h @@ -20,6 +20,7 @@ namespace currency ADD_CHECKPOINT(50000, "cb05a7bdc7f78c5cdb6ef1048f85b27c569f44879233903ce5f5a4e5bd590a3d"); ADD_CHECKPOINT(100000, "6b8b54356a9d44f6c1ebdacb8593d8f5ab2e2e2ca4493e7ae7baf4b3755c5e16"); ADD_CHECKPOINT(350000, "885841f079e5a38f1921f4a5319f0d52fdbab64bb2026ca3cabad1c032d22db7"); + ADD_CHECKPOINT(450000, "e8b789b909d59ed8a2a1e3eceb6d0b19accfe0d45cc31621b1929de80adfa702"); #else // MAINNET ADD_CHECKPOINT(425000, "46a6c36d5dec2d484d5e4845a8525ca322aafc06915ed9c8da2a241b51b7d1e8"); From 47c50ac007fb800662a493c66d8d4c970c4cc60f Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 22 Jul 2020 20:18:53 +0300 Subject: [PATCH 6/6] === build number: 95 -> 96 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index fef5b4a2..0fe50c93 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 95 +#define PROJECT_VERSION_BUILD_NO 96 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"