Bitcoin Forum
September 27, 2018, 11:23:46 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Relaying of free transactions: priority not a factor?  (Read 1324 times)
eyci
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
September 10, 2014, 10:17:37 AM
 #1

Hi I'm trying to understand the default behavior for relaying of zero fee transactions.

In AcceptToMemoryPool we have:

Code:
if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize))
{
    static CCriticalSection csFreeLimiter;
    static double dFreeCount;
    static int64_t nLastTime;
    int64_t nNow = GetTime();

    LOCK(csFreeLimiter);

    // Use an exponentially decaying ~10-minute window:
    dFreeCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
    nLastTime = nNow;
    // -limitfreerelay unit is thousand-bytes-per-minute
    // At default rate it would take over a month to fill 1GB
    if (dFreeCount >= GetArg("-limitfreerelay", 15)*10*1000)
        return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
                                 REJECT_INSUFFICIENTFEE, "insufficient priority");
    LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
    dFreeCount += nSize;
}

There's no reference to tx priority; am I right in saying that all zero-fee transactions are subject to rate-limiting, regardless of their priority?  I had the impression that this was not the case, given how it is often said that transactions with sufficiently high priority can be sent safely without fees.

An additional question: in the wiki it says that "A transaction may be safely sent without fees if ... all outputs are 0.01 BTC or larger". I'm not sure where this 0.01 BTC figure comes from, I couldn't find any reference to it in the code, could someone point it out for me?

Thanks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538090626
Hero Member
*
Offline Offline

Posts: 1538090626

View Profile Personal Message (Offline)

Ignore
1538090626
Reply with quote  #2

1538090626
Report to moderator
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1000



View Profile WWW
September 10, 2014, 11:46:03 AM
 #2

The requirement for all outputs to be 0.01 or greater was dropped. Instead the dust prevention method is now a minimum of 546 satoshi (~1/3 of fee)
https://github.com/bitcoin/bitcoin/blob/master/src/core.h  line 195

Free transactions have a minimum priority that dictates relatively large BTC amounts or well-aged coins. People can't continuously spam with this rule because they will quickly run out of funds that can be sent for free.
eyci
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
September 10, 2014, 02:16:13 PM
 #3

The requirement for all outputs to be 0.01 or greater was dropped. Instead the dust prevention method is now a minimum of 546 satoshi (~1/3 of fee)
https://github.com/bitcoin/bitcoin/blob/master/src/core.h  line 195

Thanks.

Free transactions have a minimum priority that dictates relatively large BTC amounts or well-aged coins. People can't continuously spam with this rule because they will quickly run out of funds that can be sent for free.

I know this is true for mining, i.e. CreateNewBlock, but my question is specifically about relaying/admitting to mempool. From what I can see, no matter how high the tx priority is, if there is zero fee then it's subject to rate-limiting. This suggests that even high priority transactions may not get relayed properly if they don't include a fee. Just want to make sure that I'm interpreting it correctly.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!