I would like to know what is the biggest transaction(in bytes) without a fee could be created that node would relay?
https://en.bitcoin.it/wiki/Transaction_fee#SendingA transaction may be safely sent without fees if these conditions are met:
- It is smaller than 1,000 bytes.
- All outputs are 0.01 BTC or larger.
- Its priority is large enough (see the Technical Info section below)
So because of #1 in that list, I would say 1,000.
If your tx doesn't meet the above 3 requirements, then it will check the fee. If the fee is less than MIN_RELAY_TX_FEE (currently set to 0.00001 BTC on most nodes) than they remove the transaction from their mempool and don't pass it along.
When I wrote my earlier post, I couldn't find a reference in the source for proving that those first two rules currently exist, so I left it out.
I've looked through the source code more and found the GetMinFee method, which shows the current implementation and takes an older implementation into account. The 0.01 BTC rule (0.01 BTC = CENT) and 1000 byte limits are in place for
sending but not for
relaying because prior to version 0.9, that was the rule. Since 0.9, it's been looser: no CENT rule, and a size limit of 49000 (max free - 1000) instead of 1000.
int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode)
{
// Base fee is either nMinTxFee or nMinRelayTxFee
int64_t nBaseFee = (mode == GMF_RELAY) ? tx.nMinRelayTxFee : tx.nMinTxFee;
int64_t nMinFee = (1 + (int64_t)nBytes / 1000) * nBaseFee;
if (fAllowFree)
{
// There is a free transaction area in blocks created by most miners,
// * If we are relaying we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 1000
// to be considered to fall into this category. We don't want to encourage sending
// multiple transactions instead of one big transaction to avoid fees.
// * If we are creating a transaction we allow transactions up to 1,000 bytes
// to be considered safe and assume they can likely make it into this section.
if (nBytes < (mode == GMF_SEND ? 1000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000)))
nMinFee = 0;
}
// This code can be removed after enough miners have upgraded to version 0.9.
// Until then, be safe when sending and require a fee if any output
// is less than CENT:
if (nMinFee < nBaseFee && mode == GMF_SEND)
{
BOOST_FOREACH(const CTxOut& txout, tx.vout)
if (txout.nValue < CENT)
nMinFee = nBaseFee;
}
if (!MoneyRange(nMinFee))
nMinFee = MAX_MONEY;
return nMinFee;
}
So now I believe the answer to the question is: 48999 bytes and (at least) 196 Bitcoin days destroyed (there is no limit on output sizes). That will be
relayed across the network by 0.9+ clients, which make up
a good majority of nodes now.
However, your client might not let you
send it, because it's playing it safe in regards to how many nodes might relay it. To do that, the answer is: 999 bytes and (at least) 4 Bitcoin days destroyed and all outputs >= 0.01 BTC.
There's also the IsDust rules, which in short state that if you'd have to pay over 1/3rd of your transaction in fees. However, it's unlikely that a free transaction will hit those rules. (e.g. you might if you're only sending a year-old 0.015 BTC input)
TLDR: the wiki rules are right for playing it safe.