Dzwaafu11 (OP)
|
|
March 07, 2023, 09:18:45 AM |
|
I've been a member of this forum for a while and I'm still learning new things about how bitcoin transactions work. Because I've noticed that bitcoin is sent and received in batches, my current question is about this. What should I do if the total of those batches exceeds the amount I intend to send? And why is it necessary to send and receive data in batches when other options are available? This is beyond my comprehension, which is why I'm bringing it up.
|
|
|
|
R |
▀▀▀▀▀▀▀██████▄▄ ████████████████ ▀▀▀▀█████▀▀▀█████ ████████▌███▐████ ▄▄▄▄█████▄▄▄█████ ████████████████ ▄▄▄▄▄▄▄██████▀▀ | LLBIT | | | 4,000+ GAMES███████████████████ ██████████▀▄▀▀▀████ ████████▀▄▀██░░░███ ██████▀▄███▄▀█▄▄▄██ ███▀▀▀▀▀▀█▀▀▀▀▀▀███ ██░░░░░░░░█░░░░░░██ ██▄░░░░░░░█░░░░░▄██ ███▄░░░░▄█▄▄▄▄▄████ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | █████████ ▀████████ ░░▀██████ ░░░░▀████ ░░░░░░███ ▄░░░░░███ ▀█▄▄▄████ ░░▀▀█████ ▀▀▀▀▀▀▀▀▀ | █████████ ░░░▀▀████ ██▄▄▀░███ █░░█▄░░██ ░████▀▀██ █░░█▀░░██ ██▀▀▄░███ ░░░▄▄████ ▀▀▀▀▀▀▀▀▀ |
| | | | | | | | | ▄▄████▄▄ ▀█▀▄▀▀▄▀█▀ ▄▄░░▄█░██░█▄░░▄▄ ▄▄█░▄▀█░▀█▄▄█▀░█▀▄░█▄▄ ▀▄█░███▄█▄▄█▄███░█▄▀ ▀▀█░░░▄▄▄▄░░░█▀▀ █░░██████░░█ █░░░░▀▀░░░░█ █▀▄▀▄▀▄▀▄▀▄█ ▄░█████▀▀█████░▄ ▄███████░██░███████▄ ▀▀██████▄▄██████▀▀ ▀▀████████▀▀ | . ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ░▀▄░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▀ ███▀▄▀█████████████████▀▄▀ █████▀▄░▄▄▄▄▄███░▄▄▄▄▄▄▀ ███████▀▄▀██████░█▄▄▄▄▄▄▄▄ █████████▀▄▄░███▄▄▄▄▄▄░▄▀ ████████████░███████▀▄▀ ████████████░██▀▄▄▄▄▀ ████████████░▀▄▀ ████████████▄▀ ███████████▀ | ▄▄███████▄▄ ▄████▀▀▀▀▀▀▀████▄ ▄███▀▄▄███████▄▄▀███▄ ▄██▀▄█▀▀▀█████▀▀▀█▄▀██▄ ▄██▀▄███░░░▀████░███▄▀██▄ ███░████░░░░░▀██░████░███ ███░████░█▄░░░░▀░████░███ ███░████░███▄░░░░████░███ ▀██▄▀███░█████▄░░███▀▄██▀ ▀██▄▀█▄▄▄██████▄██▀▄██▀ ▀███▄▀▀███████▀▀▄███▀ ▀████▄▄▄▄▄▄▄████▀ ▀▀███████▀▀ | | OFFICIAL PARTNERSHIP SOUTHAMPTON FC FAZE CLAN SSC NAPOLI |
|
|
|
Charles-Tim
Legendary
Offline
Activity: 1722
Merit: 5211
Leading Crypto Sports Betting & Casino Platform
|
|
March 07, 2023, 09:33:19 AM |
|
Your question is not clear, what did you mean by batches?
You can include 1 input and 1 output in your transaction and it will be broadcasted. You can also send in batches. Or you mean that miners are including transaction into candidate block in batches?
|
..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
hosseinimr93
Legendary
Offline
Activity: 2576
Merit: 5677
|
I am not sure I am understanding you correctly. Is your question "Why a bitcoin transaction can include multiple inputs and outputs?" What should I do if the total of those batches exceeds the amount I intend to send?
If I am understating you correctly: You will send the change to yourself. Assume that you have two UTXOs. One is worth 0.1 BTC and the other one is worth 0.2 BTC. You want to send 0.25 BTC to someone. Your transaction will include two outputs. One of them will be worth 0.25 BTC and will be sent to recipient. The other one will be worth 0.05 BTC minus transaction fee and will be sent back to yourself as change.
|
|
|
|
Maus0728
Legendary
Offline
Activity: 2044
Merit: 1582
|
|
March 07, 2023, 09:47:23 AM |
|
What should I do if the total of those batches exceeds the amount I intend to send?
Nothing as it will automatically fail. Remember that, just like in real life, you cannot give what you do not have, and it is the same for bitcoin transactions; You can only spend bitcoin that you own and control in your input addresses. And why is it necessary to send and receive data in batches when other options are available?
Outputs" are indivisible, which means they cannot be partially spent. This is why most basic types of bitcoin transactions have two output: one for the recipient and one for your change address. Imagine you have a $100 bill and you want to buy something that costs $50. You can't tear the bill in half and expect its value to be $50. Instead, you would hand over the entire $100 and wait for $50 in change. And similar to what bitcoin transaction does, $50 is the amount you are going to send while the remaining half will be given back to your "change address", hence having 2 outputs. If by batch you mean "pay-to-many", it is just single payment transaction having many output to reduce time, effort and fees when sending to multiple recipients.
|
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18747
|
Here is a good link which explains the output model (or "batches") which bitcoin uses: https://learnmeabitcoin.com/beginners/outputsWhat should I do if the total of those batches exceeds the amount I intend to send? You can do two things. You can either not spend all the outputs (batches) at once, and leave out the ones which are not needed. Or you can spend them all, and the left over value which you are not sending to the other party will be combined in to a new batch and sent back to your own wallet on a change address. And why is it necessary to send and receive data in batches when other options are available? The output model is superior to the account model (such as used by Ethereum) from both a privacy and a fungibility point of view. What should I do if the total of those batches exceeds the amount I intend to send? Nothing as it will automatically fail. I think you have misread OP's question. He's asking what will happen if he spends more than he wants to, not less.
|
|
|
|
Dzwaafu11 (OP)
|
|
March 07, 2023, 10:39:18 AM |
|
What should I do if the total of those batches exceeds the amount I intend to send?
Nothing as it will automatically fail. Remember that, just like in real life, you cannot give what you do not have, and it is the same for bitcoin transactions; You can only spend bitcoin that you own and control in your input addresses. Is like you didn't get me right, I mean what should I do if the number the batches are more than what I want to send.. I need more clarification about that
|
|
|
|
R |
▀▀▀▀▀▀▀██████▄▄ ████████████████ ▀▀▀▀█████▀▀▀█████ ████████▌███▐████ ▄▄▄▄█████▄▄▄█████ ████████████████ ▄▄▄▄▄▄▄██████▀▀ | LLBIT | | | 4,000+ GAMES███████████████████ ██████████▀▄▀▀▀████ ████████▀▄▀██░░░███ ██████▀▄███▄▀█▄▄▄██ ███▀▀▀▀▀▀█▀▀▀▀▀▀███ ██░░░░░░░░█░░░░░░██ ██▄░░░░░░░█░░░░░▄██ ███▄░░░░▄█▄▄▄▄▄████ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | █████████ ▀████████ ░░▀██████ ░░░░▀████ ░░░░░░███ ▄░░░░░███ ▀█▄▄▄████ ░░▀▀█████ ▀▀▀▀▀▀▀▀▀ | █████████ ░░░▀▀████ ██▄▄▀░███ █░░█▄░░██ ░████▀▀██ █░░█▀░░██ ██▀▀▄░███ ░░░▄▄████ ▀▀▀▀▀▀▀▀▀ |
| | | | | | | | | ▄▄████▄▄ ▀█▀▄▀▀▄▀█▀ ▄▄░░▄█░██░█▄░░▄▄ ▄▄█░▄▀█░▀█▄▄█▀░█▀▄░█▄▄ ▀▄█░███▄█▄▄█▄███░█▄▀ ▀▀█░░░▄▄▄▄░░░█▀▀ █░░██████░░█ █░░░░▀▀░░░░█ █▀▄▀▄▀▄▀▄▀▄█ ▄░█████▀▀█████░▄ ▄███████░██░███████▄ ▀▀██████▄▄██████▀▀ ▀▀████████▀▀ | . ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ░▀▄░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▀ ███▀▄▀█████████████████▀▄▀ █████▀▄░▄▄▄▄▄███░▄▄▄▄▄▄▀ ███████▀▄▀██████░█▄▄▄▄▄▄▄▄ █████████▀▄▄░███▄▄▄▄▄▄░▄▀ ████████████░███████▀▄▀ ████████████░██▀▄▄▄▄▀ ████████████░▀▄▀ ████████████▄▀ ███████████▀ | ▄▄███████▄▄ ▄████▀▀▀▀▀▀▀████▄ ▄███▀▄▄███████▄▄▀███▄ ▄██▀▄█▀▀▀█████▀▀▀█▄▀██▄ ▄██▀▄███░░░▀████░███▄▀██▄ ███░████░░░░░▀██░████░███ ███░████░█▄░░░░▀░████░███ ███░████░███▄░░░░████░███ ▀██▄▀███░█████▄░░███▀▄██▀ ▀██▄▀█▄▄▄██████▄██▀▄██▀ ▀███▄▀▀███████▀▀▄███▀ ▀████▄▄▄▄▄▄▄████▀ ▀▀███████▀▀ | | OFFICIAL PARTNERSHIP SOUTHAMPTON FC FAZE CLAN SSC NAPOLI |
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18747
|
|
March 07, 2023, 11:06:47 AM |
|
Is like you didn't get me right, I mean what should I do if the number the batches are more than what I want to send.. I need more clarification about that Did you read the link I provided above? https://learnmeabitcoin.com/beginners/outputsLet me provide an example. Let's say your wallet has five unspent outputs or batches of coins in it. These are called UTXOs (unspent transaction outputs). Each of your five UTXOs contain 1 BTC each. You want to send 2.5 BTC to someone. To be able to send 2.5 BTC, you must spend at least that amount. The smallest amount you can spend is 3 BTC, since you can only include an entire UTXO. So you include three of your UTXOs, which spends 3 BTC. Your wallet software will send 2.5 BTC to the other party, and will return 0.5 BTC (minus your transaction fee) to a fresh change address in your wallet. Your wallet will now have 2.5 BTC across three UTXOs - two of the original UTXOs which you haven't spent worth 1 BTC each, and a new UTXO worth 0.5 BTC. Alternatively, you could spend 5 BTC by including all five of your UTXOs worth 1 BTC each. Your wallet would still send 2.5 BTC to other party, but this time would return the other 2.5 BTC (minus your transaction fee) to a fresh change address in your wallet as a single UTXO. You would still have 2.5 BTC left in your wallet, but it would be in a single UTXO rather than split across several UTXOs. Think of each UTXO or batch like a physical bill or bank note. You can't cut a $10 bill in half in order to pay $5. You must hand over the full $10 bill and then receive a $5 bill back as change. If you wanted to give someone $30, you could give them three $10 bills and keep your other two $10 bills in your wallet, or you could hand them all five $10 bills and ask for a single $20 bill back as change.
|
|
|
|
Dzwaafu11 (OP)
|
|
March 07, 2023, 12:28:47 PM Last edit: March 08, 2023, 04:29:20 PM by mprep |
|
Is like you didn't get me right, I mean what should I do if the number the batches are more than what I want to send.. I need more clarification about that Did you read the link I provided above? https://learnmeabitcoin.com/beginners/outputsLet me provide an example. Let's say your wallet has five unspent outputs or batches of coins in it. These are called UTXOs (unspent transaction outputs). Each of your five UTXOs contain 1 BTC each. You want to send 2.5 BTC to someone. To be able to send 2.5 BTC, you must spend at least that amount. The smallest amount you can spend is 3 BTC, since you can only include an entire UTXO. So you include three of your UTXOs, which spends 3 BTC. Your wallet software will send 2.5 BTC to the other party, and will return 0.5 BTC (minus your transaction fee) to a fresh change address in your wallet. Your wallet will now have 2.5 BTC across three UTXOs - two of the original UTXOs which you haven't spent worth 1 BTC each, and a new UTXO worth 0.5 BTC. Alternatively, you could spend 5 BTC by including all five of your UTXOs worth 1 BTC each. Your wallet would still send 2.5 BTC to other party, but this time would return the other 2.5 BTC (minus your transaction fee) to a fresh change address in your wallet as a single UTXO. You would still have 2.5 BTC left in your wallet, but it would be in a single UTXO rather than split across several UTXOs. Think of each UTXO or batch like a physical bill or bank note. You can't cut a $10 bill in half in order to pay $5. You must hand over the full $10 bill and then receive a $5 bill back as change. If you wanted to give someone $30, you could give them three $10 bills and keep your other two $10 bills in your wallet, or you could hand them all five $10 bills and ask for a single $20 bill back as change. . Thank you sir I really appreciate it atleast I've know more better on how bitcoin transactions works.
Your question is not clear, what did you mean by batches?
You can include 1 input and 1 output in your transaction and it will be broadcasted. You can also send in batches. Or you mean that miners are including transaction into candidate block in batches?
From my investigation I can see that bitcoin and sent in batches. I bring it up here because I did not get right. I appreciate OELEO that gave me a link that guide me I now understand that batches can also called output [moderator's note: consecutive posts merged]
|
|
|
|
R |
▀▀▀▀▀▀▀██████▄▄ ████████████████ ▀▀▀▀█████▀▀▀█████ ████████▌███▐████ ▄▄▄▄█████▄▄▄█████ ████████████████ ▄▄▄▄▄▄▄██████▀▀ | LLBIT | | | 4,000+ GAMES███████████████████ ██████████▀▄▀▀▀████ ████████▀▄▀██░░░███ ██████▀▄███▄▀█▄▄▄██ ███▀▀▀▀▀▀█▀▀▀▀▀▀███ ██░░░░░░░░█░░░░░░██ ██▄░░░░░░░█░░░░░▄██ ███▄░░░░▄█▄▄▄▄▄████ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ | █████████ ▀████████ ░░▀██████ ░░░░▀████ ░░░░░░███ ▄░░░░░███ ▀█▄▄▄████ ░░▀▀█████ ▀▀▀▀▀▀▀▀▀ | █████████ ░░░▀▀████ ██▄▄▀░███ █░░█▄░░██ ░████▀▀██ █░░█▀░░██ ██▀▀▄░███ ░░░▄▄████ ▀▀▀▀▀▀▀▀▀ |
| | | | | | | | | ▄▄████▄▄ ▀█▀▄▀▀▄▀█▀ ▄▄░░▄█░██░█▄░░▄▄ ▄▄█░▄▀█░▀█▄▄█▀░█▀▄░█▄▄ ▀▄█░███▄█▄▄█▄███░█▄▀ ▀▀█░░░▄▄▄▄░░░█▀▀ █░░██████░░█ █░░░░▀▀░░░░█ █▀▄▀▄▀▄▀▄▀▄█ ▄░█████▀▀█████░▄ ▄███████░██░███████▄ ▀▀██████▄▄██████▀▀ ▀▀████████▀▀ | . ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ░▀▄░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄░▄▀ ███▀▄▀█████████████████▀▄▀ █████▀▄░▄▄▄▄▄███░▄▄▄▄▄▄▀ ███████▀▄▀██████░█▄▄▄▄▄▄▄▄ █████████▀▄▄░███▄▄▄▄▄▄░▄▀ ████████████░███████▀▄▀ ████████████░██▀▄▄▄▄▀ ████████████░▀▄▀ ████████████▄▀ ███████████▀ | ▄▄███████▄▄ ▄████▀▀▀▀▀▀▀████▄ ▄███▀▄▄███████▄▄▀███▄ ▄██▀▄█▀▀▀█████▀▀▀█▄▀██▄ ▄██▀▄███░░░▀████░███▄▀██▄ ███░████░░░░░▀██░████░███ ███░████░█▄░░░░▀░████░███ ███░████░███▄░░░░████░███ ▀██▄▀███░█████▄░░███▀▄██▀ ▀██▄▀█▄▄▄██████▄██▀▄██▀ ▀███▄▀▀███████▀▀▄███▀ ▀████▄▄▄▄▄▄▄████▀ ▀▀███████▀▀ | | OFFICIAL PARTNERSHIP SOUTHAMPTON FC FAZE CLAN SSC NAPOLI |
|
|
|
n0nce
|
|
March 07, 2023, 11:07:46 PM |
|
I bring it up here because I did not get right. I appreciate OELEO that gave me a link that guide me I now understand that batches can also called output
Are you sure that you mean outputs when you talk about batches? Any chance you actually mean blocks (that are processed / mined roughly every 10 minutes)? Because that's what your original post sounds like to me. To put it simply, when you send a payment, it lands in the 'mempool' (a pool of unconfirmed transactions, i.e. they have not been added to the blockchain). Once a miner picks up your transaction, he puts it into a block with a nonce value. This value is repeatedly modified and the whole block hashed, until the difficulty target is met (don't worry about this too much right now). Once he manages to do so, the block is effectively 'added' to the tip of the blockchain and includes your transaction along with a lot of others. This is what may appear as a 'batch' of processed transactions. If you were to send out too many transactions to all fit in one block, miners would just process them in the next block or the one after that, since they are just sitting in the mempool waiting. This [1] learnmeabitcoin page roughly explains mining and this [2] about candidate blocks. [1] https://learnmeabitcoin.com/beginners/mining[2] https://learnmeabitcoin.com/technical/candidate-block
|
|
|
|
mikeywith
Legendary
Offline
Activity: 2408
Merit: 6618
be constructive or S.T.F.U
|
|
March 07, 2023, 11:30:11 PM |
|
And why is it necessary to send and receive data in batches when other options are available?
It is necessary because in Bitcoin unlike banks there is nothing actually stored in your account, all you have is ownership proof of some "batches" stored inside the blockchain. In the traditional banking system, it's fairly simple, like say there are only 3 folks in the bank, so 3 accounts in total, the starting balance of each account is $10, if person A sends 5$ to person B, the bank can just take 5$ which is sitting in A's account and move it to B's account, so now B has 15$ while A has only 5$, and of course, C still has 10$. Now turn this bank into a blockchain, there is no starting balance, and there is no other bank that would give you the 10$ to deposit it in your account, however, the bank will print new money every 10 minutes, the rule states that the bank must print a unit of 10 (currently 6.25 for block rewards but 10 is easier to work with), so the bank prints 10$ and assign a signature to it where the 10$ can only be unlocked and sent by A, so now A, B, C and the bank acknowledge that this 10$ belongs to A, but don't have the means to send it to A's account, it's just that everybody knows it's his. Now A wants to send 5$ out of that 10$ which "again" isn't in his account, so he will go to the bank and show a signature that proves his ownership to that 10$, and he says, I want to pass the ownership of 5$ out of the 10$ to person B, the bank will say, ok! but yours is 10$ whom should we give the other 5$ to? he would tell them to pass ownership of that remaining 5$ to him, so the bank will "destroy" that 10$ and print 2*5$ each with its own owner/signature. As we move forward and that 5$ is going to be split into a dozen bills, it creates the "batches" you are talking about, of course, you can go back to the bank and tell them you want to combine/consolidate every single batch you want, so you sign those 100 batches, the bank "destroys" them and issues a new piece which can be only be unlocked by your signature. So bitcoin works more like "Cash" rather than "Banks", if you check any random wallet, you will see a few 10s, a couple of the 20s, a few metal coins, the wallet has 77$ in it, but it's made up of many smaller "batches", Bitcoin beats the cash system in this aspect tho, because you can't take 77$ of mixed "batches" and ask the bank to give you one 77$ bill, with Bitcoin, you can. Any chance you actually mean blocks (that are processed / mined roughly every 10 minutes)? Because that's what your original post sounds like to me.
The first question is a bit confusing, but it became pretty clear to me after reading his second question, I am pretty confident he is asking about how "outputs" are managed.
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2590
Merit: 6389
Self-proclaimed Genius
|
|
March 08, 2023, 04:18:31 AM |
|
-snip-
From my investigation I can see that bitcoin and sent in batches. I bring it up here because I did not get right. I appreciate OELEO that gave me a link that guide me I now understand that batches can also called output Are you perhaps using a " centralized wallet" or exchange? Because withdrawals from those are usually sent in batches; and it's not initiated by you, but by their system. The reason they do that is because it's cheaper to send transactions with multiple outputs than multiple transaction with single output and change. Normal transaction outputs are commonly just the recipient and change.
|
|
|
|
tbct_mt2
|
|
March 08, 2023, 12:11:50 PM |
|
I've been a member of this forum for a while and I'm still learning new things about how bitcoin transactions work. Because I've noticed that bitcoin is sent and received in batches, my current question is about this.
You can read Change address. What is the "Change" address on bitcoin wallet ? read to know !In most transactions, you won't spend all your inputs as outputs and the leftovers will be returned to your original address or to a change address. Change address is recommended to for better privacy. It is in general but more meaningful if you use self custody wallets, not custody wallets like accounts on centralized exchanges. On centralized exchanges, they always do batch transactions for user withdrawals. First, it saves transaction fees for them. Second it helps them to earn income from fee they over charge on their customers. Generally they care more about their income from processing customer withdrawals. You can use https://bitcoindata.science/plot-your-transaction-in-mempool.htmlhttps://bitcoinops.org/en/tools/calc-size/https://jlopp.github.io/bitcoin-transaction-size-calculator/to learn about input, output effects on transaction size then transaction fee.
|
RAZED | │ | ███████▄▄▄████▄▄▄▄ ████▄███████████████▄ ██▄██████▀▀████▀▀█████▄ ░▄███████████▄█▌████████▄ ▄█████████▄████▌█████████▄ ██████████▀███████▄███████▄ ██████████████▐█▄█▀████████ ▀████████████▌▐█▀██████████ ░▀███████████▌▀████████████ ██▀███████▄▄▄█████▄▄██████ █████████████████████████ █████▀█████████████████▀ ███████████████████████ | ▄▄███████▄▄ ▄███████████████▄ ▄███████████████████▄ ▄█████████████████████▄ ▄███████████████████████▄ █████████████████████████ █████████████████████████ █████████████████████████ ▀███████████████████████▀ ▀█████████████████████▀ ▀███████████████████▀ ▀███████████████▀ ███████████████████ | RAZED ORIGINALS SLOTS & LIVE CASINO SPORTSBOOK | | | NO KYC | | │ | RAZE THE LIMITS ►PLAY NOW |
|
|
|
BlackHatCoiner
Legendary
Offline
Activity: 1694
Merit: 8336
Fiatheist
|
|
March 08, 2023, 01:45:09 PM |
|
It is necessary because in Bitcoin unlike banks there is nothing actually stored in your account, all you have is ownership proof of some "batches" stored inside the blockchain. This doesn't justify why Bitcoin isn't account-based but output based. Ethereum does have account-based model for example. The reason why the account-based model is avoided in Bitcoin, is because it's more challenging computationally. It requires the entire state to be stored and constantly updated. It is also less secure, in some sort. Stealing an account requires knowledge of one private key, whereas outputs have a private key each. And let's not forget privacy. The account-based model is privacy at its worst.
|
|
|
|
o_e_l_e_o
In memoriam
Legendary
Offline
Activity: 2268
Merit: 18747
|
|
March 08, 2023, 01:58:57 PM |
|
Stealing an account requires knowledge of one private key, whereas outputs have a private key each. In an ideal world, yes, but only if addresses are never reused, which we know is not the case. And actually, if you were to never reuse an address, then it does not really matter from a security nor a privacy point of view (when it comes to someone stealing your private key or linking your transactions) if you were to use an account model or an output model. The difference is that an account model actively encourages address reuse, which is obviously bad for privacy but also for fungibility, as I mentioned above, and there are network level security implications, such as replaying previous transactions.
|
|
|
|
BlackHatCoiner
Legendary
Offline
Activity: 1694
Merit: 8336
Fiatheist
|
|
March 08, 2023, 02:12:25 PM |
|
The difference is that an account model actively encourages address reuse This is precisely what I meant, or wanted to mean apparently. When the protocol encourages reuse of an address, it encourages reckless behavior as far as security and privacy are concerned. In Bitcoin, usage of coin control, not only does it protect your privacy, but it even costs less.
|
|
|
|
oryhp
Member
Offline
Activity: 60
Merit: 89
|
|
March 08, 2023, 05:55:20 PM |
|
Perhaps the simplest model to think about is to look at what happens when you pay with banknotes in a store.
Suppose you have $20 and $10 banknotes and pay for an item that costs $22.
You give two banknotes $20 and $10, the cashier takes $22 and you get $8 back.
Bitcoin mimics this process. We just call these banknotes "outputs" and they can hold arbitrary value. So in this case, a transaction would 1. use two outputs with $20 and $10 (in btc of course) and 2. create two new outputs. One holding $22 whose owner was the cashier and one holding $8 with you as the owner
We call used outputs "inputs". It effectively splits some of the existing piles of coins (inputs aka old outputs) into new piles of coins (new outputs) and sets the owners as defined. Just like in a store.
|
|
|
|
n0nce
|
|
March 08, 2023, 11:00:05 PM |
|
Any chance you actually mean blocks (that are processed / mined roughly every 10 minutes)? Because that's what your original post sounds like to me.
The first question is a bit confusing, but it became pretty clear to me after reading his second question, I am pretty confident he is asking about how "outputs" are managed. It's funny how there are sometimes these posts where the first few replies become a guessing contest at what the original poster actually intended to ask.. My typical recommendation, as always, is for people to consider the advice written down here. (the following are just the paragraph titles)Make sure your question is on-topic and suitable for this site Search, and research Write a title that summarizes the specific problem
Introduce the problem before you post any code Help others reproduce the problem Include all relevant tags Proofread before posting! Respond to feedback after posting
|
|
|
|
mikeywith
Legendary
Offline
Activity: 2408
Merit: 6618
be constructive or S.T.F.U
|
|
March 09, 2023, 12:17:23 AM |
|
This doesn't justify why Bitcoin isn't account-based but output based. Ethereum does have account-based model for example.
Indeed it doesn't,my understanding of OP's question is how these outputs are handled, his question didn't seem like he wanted to know why Bitcoin isn't account-based in the first place, he just wanted to know "why do we use them in this way". It's a great sign that forum members are so eager to help, we go as far as guessing what the question is, and as for the Stackoverflow guidelines, it's actually almost always a wording issue, the chance of someone coming up with a question that has not been asked before are pretty slim, it's safe to assume that a large chunk of the data on the internet is redundant, OP could have found the answer if he know that "batches" are called "outputs", but how on earth would he know that? . In fact, if you check the recent answers on StackOverflow, especially for programming languages that have been there long enough, most of the solutions point to some years old question which is pretty similar to the current question, but the vocabulary differs and the user had no luck in finding answers, leads him to think that nobody has ever asked the question, happens to me all the time to be honest.
|
|
|
|
NotATether
Legendary
Offline
Activity: 1778
Merit: 7374
Top Crypto Casino
|
|
March 09, 2023, 06:52:47 AM |
|
If by "batches" you mean in blocks, then that is because it is more efficient to organize large clumps of block data than it is to sort out the millions of raw transactions that will be present across each of the 700,000+ blocks. It means that nodes will no longer have to store raw transaction data by default, and only the block data. It saves a lot of disk space that way.
|
|
|
|
|