From 884db2b4990ebee28222799e0bec9326811c9472 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Mon, 14 Oct 2024 10:55:57 +0100 Subject: [PATCH] solved issue of STAKE TXs paying out without view_tags; bumped version --- README.md | 8 ++++---- src/cryptonote_basic/cryptonote_format_utils.cpp | 4 ++-- src/cryptonote_config.h | 2 ++ src/cryptonote_core/cryptonote_tx_utils.cpp | 8 ++++---- src/multisig/multisig_tx_builder_ringct.cpp | 2 -- src/version.cpp.in | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6229fce..a54a38b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Salvium Zero v0.5.4-rc3 +# Salvium Zero v0.5.4-rc4 Copyright (c) 2023-2024, Salvium Portions Copyright (c) 2014-2023, The Monero Project @@ -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 v0.5.4-rc3 + git checkout v0.5.4-rc4 ``` * 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. 'v0.5.4-rc3'. 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. 'v0.5.4-rc4'. If you don't care about the version and just want binaries from master, skip this step: ```bash - git checkout v0.5.4-rc3 + git checkout v0.5.4-rc4 ``` * If you are on a 64-bit system, run: diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index 0c12680..bc1ba15 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -1232,7 +1232,7 @@ namespace cryptonote { for (const auto &o: tx.vout) { - if (hf_version > HF_VERSION_VIEW_TAGS) + if (hf_version > HF_VERSION_REQUIRE_VIEW_TAGS) { // from v15, require outputs have view tags CHECK_AND_ASSERT_MES(o.target.type() == typeid(txout_to_tagged_key), false, "wrong variant type: " @@ -1244,7 +1244,7 @@ namespace cryptonote CHECK_AND_ASSERT_MES(o.target.type() == typeid(txout_to_key), false, "wrong variant type: " << o.target.type().name() << ", expected txout_to_key in transaction id=" << get_transaction_hash(tx)); } - else //(hf_version == HF_VERSION_VIEW_TAGS) + else //(hf_version == HF_VERSION_VIEW_TAGS || hf_version == HF_VERSION_VIEW_TAGS+1) { // require outputs be of type txout_to_key OR txout_to_tagged_key // to allow grace period before requiring all to be txout_to_tagged_key diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 928e2ce..32d35db 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -216,6 +216,8 @@ #define HF_VERSION_2021_SCALING 2 #define HF_VERSION_ENABLE_N_OUTS 2 +#define HF_VERSION_REQUIRE_VIEW_TAGS 3 + #define HF_VERSION_ENABLE_CONVERT 255 #define HF_VERSION_ENABLE_ORACLE 255 #define HF_VERSION_SLIPPAGE_YIELD 255 diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index c54a81c..e909940 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -577,10 +577,10 @@ namespace cryptonote uint64_t amount = block_reward; summary_amounts += amount; - bool use_view_tags = hard_fork_version >= HF_VERSION_VIEW_TAGS; - crypto::view_tag view_tag; - if (use_view_tags) - crypto::derive_view_tag(derivation, 0, view_tag); + bool use_view_tags = hard_fork_version >= HF_VERSION_VIEW_TAGS; + crypto::view_tag view_tag; + if (use_view_tags) + crypto::derive_view_tag(derivation, 0, view_tag); // Should we award some of the block reward to the stakers? if (height != 0) { diff --git a/src/multisig/multisig_tx_builder_ringct.cpp b/src/multisig/multisig_tx_builder_ringct.cpp index a751276..a3c824e 100644 --- a/src/multisig/multisig_tx_builder_ringct.cpp +++ b/src/multisig/multisig_tx_builder_ringct.cpp @@ -1248,8 +1248,6 @@ bool tx_builder_ringct_t::init( rct_config, reconstruction, unsigned_tx, CLSAG_contexts, cached_w)) return false; - MCINFO("tx_builder_ringct_t::init()", "transaction_created: " << get_transaction_hash(unsigned_tx) << ENDL << obj_to_json_str(unsigned_tx) << ENDL); - initialized = true; return true; } diff --git a/src/version.cpp.in b/src/version.cpp.in index 91ee065..0071633 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.5.4-rc3" +#define DEF_SALVIUM_VERSION "0.5.4-rc4" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.3.3" #define DEF_MONERO_RELEASE_NAME "Zero"