Skip to content

Commit

Permalink
Merge pull request monero-project#3368
Browse files Browse the repository at this point in the history
38657fd Bump min ring size from 5 to 7 from v7 (moneromooo-monero)
  • Loading branch information
fluffypony committed Mar 8, 2018
2 parents 546e380 + 38657fd commit e9f41e4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@

#define HF_VERSION_DYNAMIC_FEE 4
#define HF_VERSION_MIN_MIXIN_4 6
#define HF_VERSION_MIN_MIXIN_6 7
#define HF_VERSION_ENFORCE_RCT 6

#define PER_KB_FEE_QUANTIZATION_DECIMALS 8
Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote_core/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
{
size_t n_unmixable = 0, n_mixable = 0;
size_t mixin = std::numeric_limits<size_t>::max();
const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2;
const size_t min_mixin = hf_version >= HF_VERSION_MIN_MIXIN_6 ? 6 : hf_version >= HF_VERSION_MIN_MIXIN_4 ? 4 : 2;
for (const auto& txin : tx.vin)
{
// non txin_to_key inputs will be rejected below
Expand Down
4 changes: 2 additions & 2 deletions src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ typedef cryptonote::simple_wallet sw;

#define EXTENDED_LOGS_FILE "wallet_details.log"

#define DEFAULT_MIX 4
#define DEFAULT_MIX 6

#define MIN_RING_SIZE 5 // Used to inform user about min ring size -- does not track actual protocol
#define MIN_RING_SIZE 7 // Used to inform user about min ring size -- does not track actual protocol

#define OUTPUT_EXPORT_FILE_MAGIC "Monero output export\003"

Expand Down
6 changes: 5 additions & 1 deletion src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5089,7 +5089,11 @@ int wallet2::get_fee_algorithm() const
//------------------------------------------------------------------------------------------------------------------------------
uint64_t wallet2::adjust_mixin(uint64_t mixin) const
{
if (mixin < 4 && use_fork_rules(6, 10)) {
if (mixin < 6 && use_fork_rules(7, 10)) {
MWARNING("Requested ring size " << (mixin + 1) << " too low for hard fork 7, using 7");
mixin = 6;
}
else if (mixin < 4 && use_fork_rules(6, 10)) {
MWARNING("Requested ring size " << (mixin + 1) << " too low for hard fork 6, using 5");
mixin = 4;
}
Expand Down

0 comments on commit e9f41e4

Please sign in to comment.