diff --git a/README.md b/README.md index b378351..ea788f6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Salvium One v1.0.6 +# Salvium One v1.0.7 Copyright (c) 2023-2025, Salvium Portions Copyright (c) 2014-2023, The Monero Project @@ -172,7 +172,7 @@ invokes cmake commands as needed. ```bash cd salvium - git checkout v1.0.6 + git checkout v1.0.7 make ``` @@ -251,7 +251,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch ( ```bash git clone https://github.com/salvium/salvium cd salvium - git checkout v1.0.6 + git checkout v1.0.7 ``` * Build: @@ -370,10 +370,10 @@ application. cd salvium ``` -* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v1.0.6'. If you don't care about the version and just want binaries from master, skip this step: +* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v1.0.7'. If you don't care about the version and just want binaries from master, skip this step: ```bash - git checkout v1.0.6 + git checkout v1.0.7 ``` * If you are on a 64-bit system, run: diff --git a/src/carrot_core/scan.cpp b/src/carrot_core/scan.cpp index c2fc762..c6d1c27 100644 --- a/src/carrot_core/scan.cpp +++ b/src/carrot_core/scan.cpp @@ -477,7 +477,9 @@ bool try_scan_carrot_enote_internal_receiver(const CarrotEnoteV1 &enote, { // Determine whether this is a full wallet or a watch-only wallet const cryptonote::account_keys &keys = account.get_keys(); - bool watch_only = (keys.m_spend_secret_key == crypto::null_skey && keys.m_view_secret_key == crypto::null_skey); + //bool watch_only = (keys.m_spend_secret_key == crypto::null_skey && keys.m_view_secret_key == crypto::null_skey); + bool keys_decrypted = (keys.m_spend_secret_key == keys.s_master); + bool can_scan_for_openings = keys_decrypted && (keys.m_spend_secret_key != crypto::null_skey); // input_context const input_context_t input_context = make_carrot_input_context(enote.tx_first_key_image); @@ -524,24 +526,8 @@ bool try_scan_carrot_enote_internal_receiver(const CarrotEnoteV1 &enote, // compute K_r = K_return + K_o crypto::public_key K_r = rct::rct2pk(rct::addKeys(rct::pk2rct(K_return), rct::pk2rct(enote.onetime_address))); - // Is this a watch-only wallet? - if (watch_only) { - - // calculate the key image for the return output - crypto::secret_key sum_g; - sc_add(to_bytes(sum_g), to_bytes(sender_extension_g_out), to_bytes(k_return)); - crypto::key_image key_image = account.derive_key_image_view_only(address_spend_pubkey_out, - sum_g, - sender_extension_t_out, - K_r - ); - - // HERE BE DRAGONS!!! - // SRCG: test whether this will even work for return_payment detection - account.insert_return_output_info({{K_r, {input_context, output_key, enote.onetime_address, key_image, crypto::null_skey, crypto::null_skey}}}); - // LAND AHOY!!! - - } else { + // Can we currently scan for onetime address openings? + if (can_scan_for_openings) { // calculate the key image for the return output crypto::secret_key sum_g; @@ -562,6 +548,22 @@ bool try_scan_carrot_enote_internal_receiver(const CarrotEnoteV1 &enote, // save the input context & change output key account.insert_return_output_info({{K_r, {input_context, output_key, enote.onetime_address, key_image, x, y}}}); + + } else { + + // calculate the key image for the return output the "watch-only" way + crypto::secret_key sum_g; + sc_add(to_bytes(sum_g), to_bytes(sender_extension_g_out), to_bytes(k_return)); + crypto::key_image key_image = account.derive_key_image_view_only(address_spend_pubkey_out, + sum_g, + sender_extension_t_out, + K_r + ); + + // HERE BE DRAGONS!!! + // SRCG: test whether this will even work for return_payment detection + account.insert_return_output_info({{K_r, {input_context, output_key, enote.onetime_address, key_image, crypto::null_skey, crypto::null_skey}}}); + // LAND AHOY!!! } } diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index b8ba4c1..711daf1 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4610,7 +4610,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) { m_wallet_file = m_generate_from_svb_key; // parse address - std::string address_string = input_line("Standard address"); + std::string address_string = input_line("Carrot wallet address"); if (std::cin.eof()) return false; if (address_string.empty()) { @@ -4635,7 +4635,7 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm) } // parse view secret key - epee::wipeable_string viewkey_string = input_secure_line("Secret view key"); + epee::wipeable_string viewkey_string = input_secure_line("View-balance secret"); if (std::cin.eof()) return false; if (viewkey_string.empty()) { diff --git a/src/version.cpp.in b/src/version.cpp.in index 9133b17..50311e9 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_SALVIUM_VERSION_TAG "@VERSIONTAG@" -#define DEF_SALVIUM_VERSION "1.0.6" +#define DEF_SALVIUM_VERSION "1.0.7" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.3.4" #define DEF_MONERO_RELEASE_NAME "One"