Bitcoin Forum
November 03, 2024, 02:47:58 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Consolidating Unspent Transaction Outputs  (Read 301 times)
butka (OP)
Full Member
***
Offline Offline

Activity: 434
Merit: 246


View Profile
August 06, 2018, 01:15:20 PM
 #1

I was wondering what's your way of dealing with multiple income that you receive in your bitcoin wallet.

Specifically, how do you manage your wallet in case it contains a lot of smaller unspent transaction outputs (UTXO)?
This could happen if, for example, you are getting paid smaller sums, regularly sent to the same or different bitcoin
addresses you control. Do you make an effort to consolidate these smaller values into a big one sent to
a single UTXO that would hold the total value of your coins?

You could consolidate your funds, for instance, during times when the transaction fees are low and the network is
not congested. What do you think, is there any advantage to this, other than possibly having to pay lower transaction
fees (fewer inputs, smaller transaction size) once you decide to spend the funds in the future.

In fact, for the global UTXO database, an obvious advantage would be reducing its size, becaue you are spending
multiple transaction outputs and consolidating them into a single one. It wouldn't make a huge impact if only you
were doing this, but if the majority of users adopted this practice, maybe it could reduce the size of the UTXO database?

By the way, I'm not sure where the UTXO database is stored. Is it stored on a hard drive, or in the computer's RAM?
I suppose the miners should store it in the RAM (they have to be fast in validating the transactions). Either way, I guess
this practice could save some space.

I can think of one disadvantage too: probably you are leaving a bigger fingerprint that could weaken your
anonymity and privacy. Because, by consolidating into a single UTXO, you are connecting addresses (payments) that
have been potentially unrelated before.

What are your thoughts?
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
August 06, 2018, 01:31:21 PM
 #2

I do. Every now and then, I consolidate the UTXOs into a single one with a very small fee. I don't need to use it anytime soon and it has opt-in RBF anyways.

The UTXO database isn't the largest concern since its still relatively manageable. Its roughly 2.6GB right now and the blockchain itself is more than 10 times bigger. While it is a good practice to consolidate UTXOs, making transactions when necessary and batching transactions would benefit Bitcoin much more.

The UTXO is indexed when your client synchronizes and constantly updated as long as your client is relaying transactions.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
August 06, 2018, 01:41:42 PM
 #3

Consolidating your inputs while fees are low should definitely not be ignored, especially if you are receiving a lot of small payments.
1 sat/B transactions do get confirmed pretty quick currently. But make sure to have the RBF-flag set to increase the fee in case of an unexpected spam attack.
This will barely cost you a few cents. But the advantage compared to a transaction with a big amount of inputs and high fees is definitely worth it.


By the way, I'm not sure where the UTXO database is stored. Is it stored on a hard drive, or in the computer's RAM?

RAM is non-persistent memory. Each data has to be stored on the hard drive and has to be loaded into the RAM while reading/writing to it.

mocacinno
Legendary
*
Offline Offline

Activity: 3556
Merit: 5187


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
August 06, 2018, 01:48:25 PM
Merited by LoyceV (1)
 #4

I usually only consolidate unspent outputs funding the same address... In any case I never consolidate unspent outputs funding "anonymous" addresses together with unspent outputs funding "public, known" addresses. Like previous posters already indicated: it's usually a good idear to consolidate since you can potentially save on your fees later on.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
buwaytress
Legendary
*
Online Online

Activity: 2982
Merit: 3687


Join the world-leading crypto sportsbook NOW!


View Profile
August 06, 2018, 03:16:48 PM
Merited by LoyceV (1)
 #5

I can think of one disadvantage too: probably you are leaving a bigger fingerprint that could weaken your
anonymity and privacy. Because, by consolidating into a single UTXO, you are connecting addresses (payments) that
have been potentially unrelated before.

If privacy is a concern with address association, another option is to use a consolidation spend to another service's wallet: an exchange you trust when you want to buy some other coins or simply when you want to trade/sell your Bitcoin? Or even to a mixing service - Then, not only do you consolidate, when you withdraw back to your wallet, it comes from a completely unrelated wallet (at least, in the case of a good mixer, this is what should happen).

What mocca says above about not consolidating together known and anonymous outputs is also important, otherwise you taint the consolidated amount unnecessarily.

Personally, for low-privacy wallets, I use every actual transaction opportunity I can to consolidate, since it's a tx I need to make anyway and the fees don't cost that much more just to get 3 or 4 extra inputs in. I imagine people seeing that wallet could analyse my spending habits Wink

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
butka (OP)
Full Member
***
Offline Offline

Activity: 434
Merit: 246


View Profile
August 06, 2018, 04:16:52 PM
 #6

I do. Every now and then, I consolidate the UTXOs into a single one with a very small fee. I don't need to use it anytime soon and it has opt-in RBF anyways.
Consolidating your inputs while fees are low should definitely not be ignored, especially if you are receiving a lot of small payments.
1 sat/B transactions do get confirmed pretty quick currently. But make sure to have the RBF-flag set to increase the fee in case of an unexpected spam attack.
Never crossed my mind actually. Great tip. It makes sense that if I'm consolidating, then I'm not in a hurry (to make the transaction) so I can afford to pay low fee. And the "replace by fee" flag should be set just in case.

The UTXO database isn't the largest concern since its still relatively manageable. Its roughly 2.6GB right now and the blockchain itself is more than 10 times bigger.
Somehow I thought the database was bigger. For today's standards, it is very acceptable even if it's entirely loaded into the RAM.

RAM is non-persistent memory. Each data has to be stored on the hard drive and has to be loaded into the RAM while reading/writing to it.
I see. So, should I assume that normal nodes keep the data on the hard drive to be loaded when needed to make validations, while miner nodes try to have it in the RAM most of the time to be as fast as possible in their calculations?

I usually only consolidate unspent outputs funding the same address... In any case I never consolidate unspent outputs funding "anonymous" addresses together with unspent outputs funding "public, known" addresses.
That's a great point to keep the anonymous addresses separate from the publicly known addresses.

If privacy is a concern with address association, another option is to use a consolidation spend to another service's wallet: an exchange you trust when you want to buy some other coins or simply when you want to trade/sell your Bitcoin? Or even to a mixing service - Then, not only do you consolidate, when you withdraw back to your wallet, it comes from a completely unrelated wallet (at least, in the case of a good mixer, this is what should happen).
That's another great tip. Also, never really thought of that, but it makes good sense.

Personally, for low-privacy wallets, I use every actual transaction opportunity I can to consolidate, since it's a tx I need to make anyway and the fees don't cost that much more just to get 3 or 4 extra inputs in. I imagine people seeing that wallet could analyse my spending habits Wink
Well, as a newbie who doesn't hold much bitcoins, I'm not really concerned of privacy or anonymity, but it is good to have an idea of how experienced bitcoiners are managing their bitcoins.

Thank you all for the great tips. 

LoyceV
Legendary
*
Offline Offline

Activity: 3486
Merit: 17618


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
August 06, 2018, 09:24:40 PM
 #7

Consolidating your inputs while fees are low should definitely not be ignored, especially if you are receiving a lot of small payments.
1 sat/B transactions do get confirmed pretty quick currently. But make sure to have the RBF-flag set to increase the fee in case of an unexpected spam attack.
Never crossed my mind actually. Great tip. It makes sense that if I'm consolidating, then I'm not in a hurry (to make the transaction) so I can afford to pay low fee.
I opened this thread in January: Fees are low, use this opportunity to Consolidate your small inputs!

▄▄███████████████████▄▄
▄█████████▀█████████████▄
███████████▄▐▀▄██████████
███████▀▀███████▀▀███████
██████▀███▄▄████████████
█████████▐█████████▐█████
█████████▐█████████▐█████
██████████▀███▀███▄██████
████████████████▄▄███████
███████████▄▄▄███████████
█████████████████████████
▀█████▄▄████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
d5000
Legendary
*
Offline Offline

Activity: 4088
Merit: 7496


Decentralization Maximalist


View Profile
August 06, 2018, 10:00:47 PM
Merited by buwaytress (1)
 #8

My opinion: From an individual user's perspective UTXO consolidation in low-fee periods definitively makes sense, like many have already written.

Now, for the "bigger picture" (the load on the whole network), we must differentiate between two indicators:

- blockchain size
- UTXO database size

The blockchain only grows in time, and every single transaction adds data to it. Knowing this, a "consolidation transaction" is data added to the blockchain that in theory could be avoided. As all data in the blockchain do add load to the network (take into account, for example, that new and re-syncing clients have to download all data!) from this perspective consolidation transactions can be viewed as "not network-friendly". In the medium to long term, they have an effect of pressure to transaction fees.

But on the other hand, with the UTXO database size doesn't happen the same thing. While the UTXO database tends to grow, it can also shrink temporarily if many people consolidate their UTXO set at the same time (and the growth because of new transaction is less important).

Taking this into account, a consolidation transaction should be:
- beneficial for the network, if the UTXO set is excessively big
- if the UTXO set is average or below, it is better to try to avoid it

There is, however, an "ideal" way to consolidate holdings without doing harm to the network: Try to "consolidate" with a real transaction (e.g. buy something or send BTC to an exchange). That means that you don't make a "superfluous" transaction while still benefitting the network. @buwaytress already wrote that this strategy even has privacy advantages.

That means, basically, that you try to transact and bundle your transactions in low-fee periods.

You can also combine both strategies: Every time you buy something, you can create a second output "consolidating" the rest of your coins on another address of your wallet. However, this has drawbacks with privacy, like a standard consolidation transaction.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
August 07, 2018, 08:27:17 AM
 #9

RAM is non-persistent memory. Each data has to be stored on the hard drive and has to be loaded into the RAM while reading/writing to it.
I see. So, should I assume that normal nodes keep the data on the hard drive to be loaded when needed to make validations, while miner nodes try to have it in the RAM most of the time to be as fast as possible in their calculations?

Each node keeps the data on the hard drive. But miner do not try to keep the whole UTXO data inside the RAM. Verification is performed extremely fast, even including I/O.
Keeping all of these inside the ram would decrease the time it takes to validate the transactions, but this effect is so extremely small, it is not even worth being considered. Especially with an average block interval of 10 minutes.

Miners do perform the work in form of trying to find a hash below a specific target including the block data. They verify the transactions once, and then start to find a suitable hash.

pereira4
Legendary
*
Offline Offline

Activity: 1610
Merit: 1183


View Profile
August 07, 2018, 02:34:24 PM
 #10

I like to use "Coin Control" expert feature on Bitcoin Core to deal with this. By using "Coin Control" you have the freedom of choosing exactly what coins are you moving, so you can pick the bunch of inputs that you want to consolidate into a new address.

Often times noobs get confused about how Bitcoin works and don't realize this should be pretty much a basic feature to understand if you want any privacy at all. Unfortunately, it's how things are nowadays, and I don't see it changing unless someone comes up with a way to add privacy at the protocol level to make inputs and outputs mixed by default at no additional cost. The goal for mainstream adoption is to click "send" and that's it. Having to deal with Coin Control-like advanced features isn't user friendly, but as I said, it is a must nowadays to expect any sort of privacy out of your transactions.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!