Pages:
Author

Topic: CreateTransaction: suggest/enforce fee for big low-priority transactions - page 2. (Read 7933 times)

newbie
Activity: 7
Merit: 0
Hi, I made some further observations regarding the stalled transactions that started off this discussion (so hopefully this is on-topic) :

Code:
ERROR: AcceptToMemoryPool() : ConnectInputs failed 8074fb67ce

ERROR: ConnectInputs() : 8074fb67ce mapTransactions prev not found 864bef9df1
ERROR: AcceptToMemoryPool() : ConnectInputs failed 8074fb67ce

ERROR: ConnectInputs() : 8ec51bbaf5 mapTransactions prev not found 8074fb67ce
ERROR: AcceptToMemoryPool() : ConnectInputs failed 8ec51bbaf5

ERROR: ConnectInputs() : f9ccaa5e8b mapTransactions prev not found 8ec51bbaf5
ERROR: AcceptToMemoryPool() : ConnectInputs failed f9ccaa5e8b

ERROR: ConnectInputs() : 7dddd55332 mapTransactions prev not found f9ccaa5e8b
ERROR: AcceptToMemoryPool() : ConnectInputs failed 7dddd55332

ERROR: ConnectInputs() : dafce7d622 mapTransactions prev not found 7dddd55332

I then realised these transactions are being processed sequentially, only one per block:


Any guesses tx dafce7d622... makes block #111261?

I find it very odd that exactly one transaction from this 'dependency chain' is being included into block.  Is this really the expected behaviour?  A mere coincidence?  Or something to be worried about?

My graph of 'dependency chains' I've observed in my debug.log is here:  http://pyro.eu.org/stuff/bitcoin-txqueue.pdf

Update: I think it's okay... in #111261 block, a huge chunk of items from that 'chain' I was looking at, made it into the block.  I guess there's nothing to be worried about.
legendary
Activity: 1106
Merit: 1004
And finally... we've got a problem right now; lets think about what fix(es) move us in the right direction quickly, or think about fixes that will solve the current problem (that we may need to undo/rework later).

Well, the quickest solution to the current problem would be raising the free space, I guess. Say, 3 times the current values... ?

Also, stop picking which transactions to relay based on fees... the transaction memory pool size is another matter*, but at least relaying all valid transactions should be the default behavior. But this I don't know if it would be quick to develop...

*By the way, why should a client which is not mining keep a transaction pool? Shouldn't we just leave it to the interested parties (sender and receiver) to rebroadcast the transactions once in a while if they look like "forgotten"?
lfm
full member
Activity: 196
Merit: 104
Can we make it easier to create multi-output txn for peole like slush to distribute to large lists?

 That could save a lot of bytes both network and disk in the long run. pudinpop had custom ways of making them in his miner.
legendary
Activity: 1652
Merit: 2311
Chief Scientist
RE: limitfreerelay:

Agreed, that's better.  I think we should start soft-coding the amount that is considered "free" instead of hard-coding CENT, and make the default less than 0.0001 BTC.

Separate subjects:

The entire transaction memory pool should be size-limited, with lower-priority transactions dropped.

I agree with Steve-- free transactions are a HUGE selling point, and I think rational miners should realize that their bitcoins will be more valuable if there are more users.  And there will be more users if "free transactions" is a feature.  I think we can come up with a solution where "normal" transactions are free, but spam or abnormally complicated transactions (yes, like those bitpenny rewards pooled mining participants are currently getting once a day) "require" a fee (where "require" is really "if you don't include a fee your transaction will probably never be confirmed.")

And finally... we've got a problem right now; lets think about what fix(es) move us in the right direction quickly, or think about fixes that will solve the current problem (that we may need to undo/rework later).
legendary
Activity: 1106
Merit: 1004
Currently clients will not even relay transactions if their fees are "too low". This needs to be changed for the fee market to work.

I disagree.  You cannot change that without vastly increasing the ability to spam the network with useless transactions.

It's not up to the client - specially, not up to the default implementation of it - to decide what are "useless" transactions or not. It's up to the miners. The clients should reject only illegal transactions, like double-spending, wrong signatures etc.
legendary
Activity: 1106
Merit: 1004
No, what I suggest is making such limit adjustable just like the difficulty factor, as a "network rule", not something a user could change. There in the topic I explain more: https://bitcointalksearch.org/topic/block-size-limit-automatic-adjustment-1865

I'm still against that. Until there is some out-of-band method for lightweight clients to be notified of their own transactions, the max block size must be kept low enough for everyone to keep up with blocks. It's not reasonable to expect every client to download 100MB per hour (or whatever).

The block size wouldn't reach 100MB unless that was really needed. And if it's needed, clients would need to adapt anyway (ligthtweight clients or banks, whatever).
And such increase should be gradual, somebody there in the topic suggested making the maximum limit something like 110% of the average size from the last N blocks. It might be a good approach, in order not to increase too fast.

Anyway, I understand your concern.
Any chances of having the blockexplorer data provided via JSON and/or RPC/RMI/etc? Having an interface like that could make it easier for the development of such lightweight client.
legendary
Activity: 1596
Merit: 1100

This is pretty simple:

Code:
diff --git a/main.cpp b/main.cpp
index a47f3a9..0e56b59 100644
--- a/main.cpp
+++ b/main.cpp
@@ -739,7 +739,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fChe
             return error("AcceptToMemoryPool() : not enough fees");
 
         // Limit free transactions per 10 minutes
-        if (nFees < CENT && GetBoolArg("-limitfreerelay"))
+       bool fLimitFreeRelay = GetBoolArg("-nolimitfreerelay") ? false : true;
+        if (nFees < CENT && fLimitFreeRelay)
         {
             static int64 nNextReset;
             static int64 nFreeCount;
legendary
Activity: 1596
Merit: 1100
Having a memory pool size limit where transactions are removed based on priority would solve that, I think. Enabling the -limitfreerelay switch by default might also help (with lower minimum fees).

Agreed x 2

Lack of that size limit is really an unfixed DoS issue.

administrator
Activity: 5222
Merit: 13032
I disagree.  You cannot change that without vastly increasing the ability to spam the network with useless transactions.

Having a memory pool size limit where transactions are removed based on priority would solve that, I think. Enabling the -limitfreerelay switch by default might also help (with lower minimum fees).
donator
Activity: 826
Merit: 1060
It needs to be simple for the user, yet effective for controlling spam.

How about a single setting in the standard client, that controls the fee per transaction input. The default can be something very low (0.0001 per transaction input).

That will also incentivize someone to write code to make the client's input coin selection more optimal, to the benefit of the network as a whole.
hero member
Activity: 868
Merit: 1008
After IRC discussion, I became aware of transaction rate limiting as a means of mitigating the spam problem...I hadn't realized that before, but I think it's a pretty simple solution to the spam problem (much simpler that the proof of work suggestion I made earlier).

I don't agree with eliminating free transactions...in fact, I believe the likely trajectory of things is that transactions will be remain free (I mean just look at all the unprofitable mining that's happening now).  Merchants, exchanges and many others have an interest in facilitating transactions and will always step in to ensure they get processed, even the free ones.  In fact, everyone using bitcoins has an interest in free transactions.  It's a good selling point and a way to attract new users (and without new users, this experiment will fail).  I know this doesn't come as good news to those of you hoping to strike it rich through mining (though maybe there is a future for you in collecting fees from those merchants willing to subsidize the cost of mining).

Other than that, I agree with molecular's other proposals.  I will add that clients need to become smarter about prioritizing the transactions they forward to ensure the p2p traffic remains manageable and clients need to have a strong role in deciding which blocks are accepted and which are rejected (it would be bad if an attacker with a very large budget could buy the resources necessary to dominate block creation and prevent almost everyone's transactions from getting through).

full member
Activity: 171
Merit: 127
My humble opinion - there is no free lunch. Every transaction must have a price. This price should be a constant, bound to current definitions of COIN and CENT.

Anything else is just a dream.
legendary
Activity: 1596
Merit: 1100
Currently clients will not even relay transactions if their fees are "too low". This needs to be changed for the fee market to work.

I disagree.  You cannot change that without vastly increasing the ability to spam the network with useless transactions.

administrator
Activity: 5222
Merit: 13032
No, what I suggest is making such limit adjustable just like the difficulty factor, as a "network rule", not something a user could change. There in the topic I explain more: https://bitcointalksearch.org/topic/block-size-limit-automatic-adjustment-1865

I'm still against that. Until there is some out-of-band method for lightweight clients to be notified of their own transactions, the max block size must be kept low enough for everyone to keep up with blocks. It's not reasonable to expect every client to download 100MB per hour (or whatever).

Automatic adjustments might be OK if lightweight clients can find their own transactions without downloading full blocks. Then only miners would have to worry about network and disk space usage. But when the max block size is over 10MB, the massive disk space requirements (500GB per year) will cause there to be only a handful of miners, and at that point all the miners will be able to come to an agreement about block size with relative ease due to their small number.
legendary
Activity: 1106
Merit: 1004
Currently clients will not even relay transactions if their fees are "too low". This needs to be changed for the fee market to work.

Really? This is bad! It's not up to the client to decide that... at most, relay and then forget about them, but don't ignore them.

Quote
By the way, I still think it would be a good idea to make the maximum block size variable, instead of a hardcoded constant as it's right now.

The user should never be able to change the max block size without significant effort. You're pretty much guaranteed to end up on a separate chain sooner or later if you change this value.

No, what I suggest is making such limit adjustable just like the difficulty factor, as a "network rule", not something a user could change. There in the topic I explain more: https://bitcointalksearch.org/topic/block-size-limit-automatic-adjustment-1865
administrator
Activity: 5222
Merit: 13032
Can't this code be just separated from the default client?
I don't see a reason to have a miner in the default client anymore... It's useless, since CPU-mining is useless, and besides, things like fee policy for instance are really arbitrary and may change during time. It would be better if the default client was there just to set up the "protocol rules" and nothing more.

The client has to do all the verification and processing for blocks/transactions, anyway, so I don't see the harm in providing the necessary info to separate mining software. It's certainly not something every mining program should have to handle.

Currently clients will not even relay transactions if their fees are "too low". This needs to be changed for the fee market to work.

Quote
By the way, I still think it would be a good idea to make the maximum block size variable, instead of a hardcoded constant as it's right now.

The user should never be able to change the max block size without significant effort. You're pretty much guaranteed to end up on a separate chain sooner or later if you change this value.
legendary
Activity: 1106
Merit: 1004
Most miners (including slush's pool) use Bitcoin's getwork, so default fees are important. The ability to modify fee rules would be nice, though.

Can't this code be just separated from the default client?
I don't see a reason to have a miner in the default client anymore... It's useless, since CPU-mining is useless, and besides, things like fee policy for instance are really arbitrary and may change during time. It would be better if the default client was there just to set up the "protocol rules" and nothing more.

Anyway, if we really need to set up a default fee policy, then definitely these free transaction limits should be raised.

By the way, I still think it would be a good idea to make the maximum block size variable, instead of a hardcoded constant as it's right now.

Quote
Perhaps the client should stop retransmitting, and reclaim, transactions if, oh, 5,000 blocks go by without the transaction getting accepted.

Good idea. There should also be a manual reclaim ability.

Yes, manual reclaim and manual resending, that should do it. Smiley
donator
Activity: 2772
Merit: 1019
Digesting all comments, maybe this could a workable consensus:

 1.) remove "free transaction space" altogether. Argument (by many): free transactions are not going to make it in the long run anyways, where probably never intended to. This would generate a market for transaction processing by miners, which was intended from the beginning and will be their main income after generation ends. Regarding the pool issue: This moves the problem to the originator (where it belongs): the pool-miner receiving very small payments has to either pay the price by using higher tx-fee to spend it or avoid the problem by increasing his payout treshold. This also mitigates DoS attacks.

 2.) make smaller transaction fee (down to 0.0001) possible. Argument: 0.01 might be too much as minimum fee. There are poor people.

 3.a) Client should also warn about low priority transactions and suggest a fee to increase chance for inclusion.
 3.b) Make it possible to increase transaction fee of an already broadcast transaction. Argument: this would obsolete 3.a) and introduce transaction fees to users in a nice fashion (user sees transaction not being confirmed, user sees the fee is 0.00, some gui hint tells him he can speed things up by increasing fee)

 4.) Let existing backlog trickle in slowly, don't automatically expire or allow reclaiming of transactions in any way. Argument (by Steve): Expiring transaction would open up the possibility of clients deliberately crafting transactions to fail (in order to get something for nothing)

newbie
Activity: 7
Merit: 0
If someone can flood the network with free transactions to/from their own addresses, and there's no way to make sure legitimate transactions are unaffected, there'd soon be no such thing as a free transaction any more.  Would it be so bad to disallow them to conserve resources?  The difficulty I imagine, would be in enforcing a minimum fee that would be remain sensible as BTC's value varies.

...was proposed years ago to solve the spam dilemma...proof-of-work.  If you want to issue a free transaction, the network could require a small proof of work for such transactions.

As for requiring 'proof of work';  requiring a BTC value inherently does that (they could join a mining pool to do the 'proof of work', then use their earnings to pay the fees).
legendary
Activity: 1596
Merit: 1100
What would stop a well funded, bad actor from using a super computer to create blocks with only a few of it's own transactions in it?  Someone that wanted to undermine bitcoin?  I think it's a very bad idea for the network to not set some criteria regarding transaction inclusion into blocks.

If you have enough CPU power to dictate specifically which transactions into a block, we have bigger things to worry about (double spending).

There are plenty of validity checks on blocks and tx's in the client.  It's just that fees are not one of those checks, permitting miners to choose their own policy.

Pages:
Jump to: