Pages:
Author

Topic: Advantage of coin control, response to Mike Hearn (Read 4707 times)

legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
Coin Control is more fun!



Keep the output to less than 10k (or about 62 unspent) and you have no fee too.
hero member
Activity: 501
Merit: 500
Why I want coin control:

I understand keypairs.

I understand (on a basic level) how the blockchain and transactions work.

I do not understand the abstractions such as "accounts" built on bitcoin that the client imposes on me. They are neither something from the financial world nor something from the cryptography world. I can't see how they are useful and frankly I don't WANT TO learn how to use them.

I think a more sophisticated "accounting" system on top of the raw protocol could be useful if you are building a payment processing system on top of Bitcoin. I, as an end user, expect to do transactions very rarely and to spend a lot of time preparing whenever I have to make a transaction. Such as installing the newest client and downloading the blockchain.

So, what I want is:

1. The ability to import privkeys, preferably in many formats.
2. The ability to make raw transactions.

What I would like on top of those:

3. All kinds of "are you really really sure" warnings for anything that would be broadcast over to the network. Maybe even a configurable delay so that I could back out if I notice I made a mistake.

I do not want to keep any kind of a hot wallet, thank you very much. And I think the addressess (pubkeys) are a very useful thing to know, so I can check my balances from any third party service.

I do not want to run a node continuously.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
100 day old 0.01 BTC is the smallest then, and 10 minute old 144 BTC is largest. If I have 19 dust, I should use 20 bitcoin days. Going to the extremes, I'd need 2000 day old 0.01 BTC, or 2880 BTC if I want it next block.
hero member
Activity: 784
Merit: 1000
0xFB0D8D1534241423

  • Use youngest coins (aged coins are a resource)


Why would you care if the coins are old or young?  Why are aged coins a resource?


The age of inputs is a factor in calculating transaction priority. With a 1 week old 1 BTC coin, you can spend 5+ SatoshiDICE dust inputs for free.

Would you have an easy chart on how this works? Say, for every day (or 144 block) equivalent of 1 BTC, how many SatoshiDICE dust inputs can be spent for free. Will this also convert to, for example, a 1 block old 144 BTC? And a 6 block old (1 hour) 24 BTC. 2 block old 72 BTC. 3 block old 48. 12 block old 12 BTC. etc?
The Wiki has a technical explanation, but I'll try to simplify it. You must multiply number of satoshi's (10^-8 BTC) by number of confirmations and divide that by the total number of bytes to get priority. If the priority is greater than a 1 day 1 BTC coin (144 confs * 10^8 / 250 bytes), it can be free.

Now in reality, since compressed keys can be used, a transaction can be less than 250 bytes (min 225 for a standard one-input two-output tx).
Also, the number of bytes added by one more input varies greatly. Compare
http://blockchain.info/tx/8be6d23b774c9a5934c3a1927754e3fca4c98d6d95de7666a7f12df1d06f9b31
with
http://blockchain.info/tx/27bf16c3febd2c668ac867e378ca3fd9880a16cb969d4d54015553ed64416e95
to see what I mean. Both have 2 inputs and 2 outputs, yet there's a 64-byte difference between them.

If you give yourself a good cushion, though, you'll be fine. The easiest way is to use one bitcoin-day per input. If you're spending a dust tx, make sure you have 2 bitcoin-days. If you're spending 10 dust tx's, use 11 bitcoin-days. All bitcoin-days are created equal (except some days have more blocks than others; this is near-negligible). A 20-day 0.05 BTC has the same priority as a 1 day 1 BTC input.

Caveat: never create a sub-0.01 BTC output, no matter the priority.

I hope that was clear enough. If not, ask away!


P.S. The fee rules are not set in stone. Some miners have custom fee rules, and the rules in the reference client may soon change.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto

  • Use youngest coins (aged coins are a resource)


Why would you care if the coins are old or young?  Why are aged coins a resource?


The age of inputs is a factor in calculating transaction priority. With a 1 week old 1 BTC coin, you can spend 5+ SatoshiDICE dust inputs for free.

Would you have an easy chart on how this works? Say, for every day (or 144 block) equivalent of 1 BTC, how many SatoshiDICE dust inputs can be spent for free. Will this also convert to, for example, a 1 block old 144 BTC? And a 6 block old (1 hour) 24 BTC. 2 block old 72 BTC. 3 block old 48. 12 block old 12 BTC. etc?
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
Maybe I am missing something.  Does Armory have this already?  Why do you want a change to the Bitcoin software if this be done by a wallet or plugin that sits on top of the main software? 

Armory lets you control the source addresses, not the individual coins (but still called "Coin Control").  People requested "Coin control", I gave them that, and I haven't really heard any complaints.  So I left it alone.



I think I understand, maybe:  Some people say that one Bitcoin is just like another (just like atoms in quantum mechanics where you can't distinguish one from another) but that is not really true.  Each satoshi has a history which can be traced back to the point it was mined.  With the Armory "coin control" it allows you to control the balances in the individual addresses but not each satoshi within each address.  What coin control would do is allow control over each individual Satoshi.  It seems to me that a wallet could do coin control without changing the main Bitcoin client but it would be a complicated programming task (but not impossible).  However, it may be easier to implement coin control if the main client was changed to make it easier to have coin control.  Is this the issue?

If you never reuse addresses, it is identical.  I wouldn't think of it as controling each satoshi... every time you receive X BTC, that's like an $X-bill (if $1/BTC) now sitting in your wallet.  When you want to give someone 10 BTC (assuming X is more than 10), you sign a transaction that uses that $X-bill as input, and has two outputs:  assigning 10 BTC to their address, and assigning X-10 to a change address you own.  Now they have a 10-BTC bill in their wallet, and you have an (X-10)-BTC bill in your wallet.  The original bill is "spent" (never to be used again).

Really, your signature allows you to destroy X-BTC bills, and create new bills with new owners equal in size to the original (anything left over is claimed by the miner that mines the transaction as a fee).  Armory coin control basically says "I only want to use bills from these N addresses, no others".  The intent was to give users control over what addresses are linked when you create transactions.  Some people want more than that, and want to control individual bills... Armory doesn't have that.
hero member
Activity: 784
Merit: 1000
0xFB0D8D1534241423

  • Use youngest coins (aged coins are a resource)


Why would you care if the coins are old or young?  Why are aged coins a resource?


The age of inputs is a factor in calculating transaction priority. With a 1 week old 1 BTC coin, you can spend 5+ SatoshiDICE dust inputs for free.
legendary
Activity: 1708
Merit: 1020

  • Use youngest coins (aged coins are a resource)


Why would you care if the coins are old or young?  Why are aged coins a resource?

free to send

no taint  Roll Eyes
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
I actually like Coin Control, so I can play SatoshiDice using only one address, and using only the inputs from that address, to make the bet, to set the change address to the same, to win or to lose (and collect dust), to bet again (consolidates dust) ... Of course, if you play that way, unless you wait long enough for the required blocks to achieve high priority and have a large number of coins for that purpose, you might end up always paying the transaction fee.
kjj
legendary
Activity: 1302
Merit: 1026
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Bitcoin already has an expert mode, and has had it for a while now.

It does ?

I dont't see an "EXPERT MODE" button with a big, red, scary warning (YOU MIGHT LOSE UR MONIES !!!!!!!!!) anywhere.

How do I enable it ?

Debug console. The warning is replaced by the fact that using it is hard.

This isn't exactly what i was suggesting.

Expert mode can still have a reasonably nice GUI, like CoinControl.
kjj
legendary
Activity: 1302
Merit: 1026
Bitcoin already has an expert mode, and has had it for a while now.

It does ?

I dont't see an "EXPERT MODE" button with a big, red, scary warning (YOU MIGHT LOSE UR MONIES !!!!!!!!!) anywhere.

How do I enable it ?

Debug console. The warning is replaced by the fact that using it is hard.

This indeed.  Documentation can be found here.
hero member
Activity: 784
Merit: 1000
0xFB0D8D1534241423
Bitcoin already has an expert mode, and has had it for a while now.

It does ?

I dont't see an "EXPERT MODE" button with a big, red, scary warning (YOU MIGHT LOSE UR MONIES !!!!!!!!!) anywhere.

How do I enable it ?

Debug console. The warning is replaced by the fact that using it is hard.
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Bitcoin already has an expert mode, and has had it for a while now.

It does ?

I dont't see an "EXPERT MODE" button with a big, red, scary warning (YOU MIGHT LOSE UR MONIES !!!!!!!!!) anywhere.

How do I enable it ?
kjj
legendary
Activity: 1302
Merit: 1026
Bitcoin already has an expert mode, and has had it for a while now.
legendary
Activity: 1708
Merit: 1020
[...]
Great idea! I would definitely pay good money for a simple, single-purpose bc spender that enables:

(1) import a privkey
(2) spend from it
(3) delete the privkey

Nothing more. Everything else is superfluous complication that stops my granny from using bc. It need not even show the balances in my privkeys, since I can easily get this information on the web.

Three functions: import, spend, delete.

The only reason you call this utter simplicity "expert mode" is because you cannot resist throwing in many other functions that few uninterested-in-bitcoins end-users care about. Again, import, spend, delete. Do that--and nothing but that--and you can charge $30 a copy (especially if you make Android, Mac, and Windows versions.)
ever tried http://brainwallet.org? Thanks for the $30.  Wink
(not sure if it is safe, though)

I second the expert mode. Pop up a big scary warning message when a user enables it, but let the user decide.

For me, coin control is mostly a privacy thing. You're always told not to reuse addresses, but if you then make a payment a bunch of different addresses are combined for the input. Everybody can see that those belong to the same wallet then. Parse the blockchain and one can group those addresses by the wallets. If one address of those can be mapped to a user, all others are automatically mapped too.

It's like having accounts with three or four different banks and while you can define which account receives funds you're unable to say which bank(s) will pay a bill.

As for change, there could be some default/expert options:
1. directly back to the source
2. if several source addresses are used, offer a drop-down list
3. offer a list with all your addresses
4. generate a random new address
quoted you here: https://bitcointalksearch.org/topic/addresses-linked-by-default-potential-privacy-risk-in-standard-client-others-163757     
"Addresses Linked by Default - Potential Privacy Risk in Standard Client & Others"
hero member
Activity: 576
Merit: 514
I second the expert mode. Pop up a big scary warning message when a user enables it, but let the user decide.

For me, coin control is mostly a privacy thing. You're always told not to reuse addresses, but if you then make a payment a bunch of different addresses are combined for the input. Everybody can see that those belong to the same wallet then. Parse the blockchain and one can group those addresses by the wallets. If one address of those can be mapped to a user, all others are automatically mapped too.

It's like having accounts with three or four different banks and while you can define which account receives funds you're unable to say which bank(s) will pay a bill.

As for change, there could be some default/expert options:
1. directly back to the source
2. if several source addresses are used, offer a drop-down list
3. offer a list with all your addresses
4. generate a random new address
staff
Activity: 4284
Merit: 8808
As for the first one, finding the optimal transaction is (I think) NP-complete.
There are efficient integer linear programming solutions for most problem cases, at least for some sensible objectives (like "minimize priority subject to meeting the free relay criteria").

Actually deciding what you want to be your objective is AI-complete though. Tongue
hero member
Activity: 784
Merit: 1000
0xFB0D8D1534241423
Coin control is pretty much the only way to spend dust transactions. E.g. SatoshiDICE dust can be pruned if it is added to a large input and then spent.
Coin control is pretty much the best way to avoid associating addresses that should stay separate.

As for the first one, finding the optimal transaction is (I think) NP-complete. Assuming it can be brute-forced (throw every input-combination together, select best one), I think these would be my priorities, in order:

  • Lowest fee
  • Use most dust inputs (dust is hard to spend, pruning is good)
  • Use youngest coins (aged coins are a resource)
  • Smallest size

Currently I just use createrawtransaction and pick a good-looking set of inputs.
legendary
Activity: 1400
Merit: 1013
Clearly a user might not want UTXOs to be consolidated b/c that could break privacy. 
The best of both worlds would be to invent a protocol for trustless P2P mixing that would allow a user to consolidate UTXOs as part of the mixing process.
Pages:
Jump to: