aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-08-14 21:12:11 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-08-21 12:36:53 +0000
commit844fb4e940478ca0ddf31115018326d667edc549 (patch)
treea851b659a5daf2b900eea6db65399eb9aaa8bcc8 /src
parentMerge pull request #6586 (diff)
downloadmonero-844fb4e940478ca0ddf31115018326d667edc549.tar.xz
enforce claiming maximum coinbase amount
Claiming a slightly lesser amount does not yield the size gains that were seen pre rct, so this closes a fingerprinting vector
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_config.h1
-rw-r--r--src/cryptonote_core/blockchain.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h
index 87bb4e15a..51912ce58 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
@@ -173,6 +173,7 @@
#define HF_VERSION_REJECT_SIGS_IN_COINBASE 12
#define HF_VERSION_ENFORCE_MIN_AGE 12
#define HF_VERSION_EFFECTIVE_SHORT_TERM_MEDIAN_IN_PENALTY 12
+#define HF_VERSION_EXACT_COINBASE 13
#define PER_KB_FEE_QUANTIZATION_DECIMALS 8
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 7851b0f6a..dafc44803 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1392,8 +1392,8 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
MERROR_VER("coinbase transaction spend too much money (" << print_money(money_in_use) << "). Block reward is " << print_money(base_reward + fee) << "(" << print_money(base_reward) << "+" << print_money(fee) << "), cumulative_block_weight " << cumulative_block_weight);
return false;
}
- // From hard fork 2, we allow a miner to claim less block reward than is allowed, in case a miner wants less dust
- if (version < 2)
+ // From hard fork 2 till 12, we allow a miner to claim less block reward than is allowed, in case a miner wants less dust
+ if (version < 2 || version >= HF_VERSION_EXACT_COINBASE)
{
if(base_reward + fee != money_in_use)
{