From bfe8c4606d451d61dd9f23c944c56e4de2dbf458 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Thu, 14 Aug 2025 12:07:53 +0100 Subject: [PATCH] fixed AUDIT payout scanning for split AUDIT TXs; bumped RC version --- src/version.cpp.in | 2 +- src/wallet/scanning_tools.cpp | 17 ++++++++++------- src/wallet/scanning_tools.h | 2 ++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/version.cpp.in b/src/version.cpp.in index b6a6ff2b7..6edbea954 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 "0.9.9-rc5" +#define DEF_SALVIUM_VERSION "0.9.9-rc6" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.3.4" #define DEF_MONERO_RELEASE_NAME "One" diff --git a/src/wallet/scanning_tools.cpp b/src/wallet/scanning_tools.cpp index c181337f6..a49fafc4c 100644 --- a/src/wallet/scanning_tools.cpp +++ b/src/wallet/scanning_tools.cpp @@ -132,6 +132,9 @@ static bool try_load_pre_carrot_enote(const bool is_coinbase, enote_out.amount_commitment = rct::Z; } + // Check for protocol_tx outputs + enote_out.is_protocol_tx_output = (tx.type == cryptonote::transaction_type::PROTOCOL); + return true; } //------------------------------------------------------------------------------------------------------------------- @@ -168,8 +171,8 @@ static std::optional view_incoming_scan_pre_car crypto::ec_scalar amount_key; if (!hwdev.derivation_to_scalar(receive_info->derivation, - enote.local_output_index, - amount_key)) + enote.is_protocol_tx_output ? 0 : enote.local_output_index, + amount_key)) return std::nullopt; // a @@ -208,16 +211,16 @@ static std::optional view_incoming_scan_pre_car // derive k^g_o crypto::secret_key sender_extension_g; if (!hwdev.derivation_to_scalar(receive_info->derivation, - enote.local_output_index, - sender_extension_g)) + enote.is_protocol_tx_output ? 0 : enote.local_output_index, + sender_extension_g)) return std::nullopt; // K^j_s' crypto::public_key address_spend_pubkey; if (!hwdev.derive_subaddress_public_key(enote.onetime_address, - receive_info->derivation, - enote.local_output_index, - address_spend_pubkey)) + receive_info->derivation, + enote.is_protocol_tx_output ? 0 : enote.local_output_index, + address_spend_pubkey)) return std::nullopt; //pid diff --git a/src/wallet/scanning_tools.h b/src/wallet/scanning_tools.h index b33e641ce..cb183f174 100644 --- a/src/wallet/scanning_tools.h +++ b/src/wallet/scanning_tools.h @@ -100,6 +100,8 @@ struct PreCarrotEnote bool short_amount; rct::key amount_commitment; rct::ecdhTuple amount; + + bool is_protocol_tx_output; }; using MoneroEnoteVariant = std::variant