Answer the question
In order to leave comments, you need to log in
How does “change” work when making a Bitcoin transaction?
I apologize if this question seems stupid to someone, but I just can’t fully understand how bitcoin transactions are arranged and how they are stored in the Blockchain.
I noticed that when sending money from one wallet to another, not one operation takes place, but several at once. Those. one transaction contains several recipient addresses at once and different amounts for each of the addresses.
One of these addresses is indeed the one that was specified by me as the "recipient" in the bitcoin client when sending money.
I also noticed that the total amount of the transaction is equal to the last receipt of money in my wallet. Those. as if the whole piece is sent, some of them really go to the addressee, and some go to my own addresses (seemingly). Those. Are the receipts to my account "indivisible"?
I probably don’t understand anything because I don’t know what Inputs and Outputs are and, in general, how data is stored in Blockchain.
I asked a question on Reddit/r/Bitcoin, where they advised me this link
bitcoin.stackexchange.com/questions/736/how-does-c...
I read, translate, even printed it out. I don't understand anything.
Regarding the difference between an account and an address, this is understandable. One account, many addresses in it. Each address has a private key. But who are "Inputs" and "Outputs" and why do they exist?
I would be extremely grateful for your help.
UPDATE: I forgot to point out that I used the address https://blockchain.info/ru/address/ to view transactions, and the original bitcoin-qt as a bitcoin client
Answer the question
In order to leave comments, you need to log in
There is no such thing as "money in Y's wallet". There is a concept "transferred amount X to wallet Y". From these transfers, the amount on the wallet is added up. And you can spend (if I don’t confuse anything) only in the same pieces as you were listed. That is, for example, you have 2 bitcoins, which came to you with 4 transfers of 0.5 each. If you want to transfer 1.8 to someone, then say that "I take these 4 transactions and from them I give 1.8 to such and such a dude, and I keep 0.2 for myself" either to one of the existing wallets or to a newly generated one.
A wallet is a set of generated private key/address pairs, some of which may have unspent outputs (such as banknotes).
Bitcoin transactions have inputs and outputs, outputs can be spent by creating a bitcoin transaction, where these outputs become inputs, and the outputs are the address of the recipient and (optionally) the address where the difference between the sum of the inputs and the value that this recipient will receive will go.
All in all, it needs some thought :-)
Each transaction is stored in the Blockchain as information, but the main role of the Blockchain is to set the order of transactions: each block is like a wagon in which firewood lies - each firewood is unique, numbered, encrypted - these firewood are transactions and the entire wagon is stamped so that attackers do not open and they didn’t steal a single firewood, otherwise there will be underweight and inconsistency with other exact indicators (determined by milligrams :)).
Figuratively, there is also a TransactionChain - this is another chain in this chain, transactions go one after another, referring to each other from the moment when the emission occurred (for example, a chain of 500 transactions and so on until the fractal reserve runs out).
I’m more interested in another question: as far as I understand, the computer user of the bitcoin client is checking the TransactionChain based on the data received from the blockchain folder and other information - I also don’t know the storage hierarchy - tell me - the blockchain is stored separately from the transaction chain or the transaction chain is located directly in one file together with blockchain?
But the most basic question that directly keeps me awake: how long should the chain of these outputs / inputs, counting from the genesis block, become in order to clog the processor with overly complex calculations? Yes, I understand that the bitcoin client in the first launch can only check the TransactionChain chains for validity for several hours (if I understood correctly by the timing, correct it if it’s wrong - and tell me how much time it actually takes).
I am interested in how big the TransactionChain chain should be in order for the computer to take more than 1 day to analyze what is happening (In the sense that if the blockchain is not cut off in the future, astronomical sums will accumulate anyway).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question