Newbie question about transactions

5 replies 377 views
samvectorMember
Posts: 7 · Reputation: 85
#1Oct 11, 2022, 12:07 PM
Hey everyone, I'm currently going through "Bitcoin. Basics and Programming" by Andreas Antonopoulos and I'm trying to wrap my head around transactions. He mentions that all the transaction examples in his book are real. One example he provides is a transaction link where Alice sends money to Bob. I noticed that: - the input transaction is 4ac541802679866935a19d4f40728bb89204d0cac90d85f3a51a19278fe33aeb:1 worth 0.001 BTC - 0.0002 BTC went to bc1p8dqa4wjvnt890qmfws83te0v3qxzsfu7ul63kp7u56w8qc0qwp5qv995qn - 0.00075 BTC was sent to bc1qwafvze0200nh9vkq4jmlf4sy0tn0ga5w0zpkpg (this should be the change back to Alice's wallet). So, I assume Alice's wallet is bc1qwafvze0200nh9vkq4jmlf4sy0tn0ga5w0zpkpg. But then, looking at the input transaction for that, I see: - input transaction is e6264ea63c267f1d54ae0125020745356eb054fdec09c51fcc403d9f0ce95ac2:0 worth 0.18312922 BTC - 0.18210494 BTC was sent to bc1q44c67v69aqlmv3hmw236uw0yjh2xvf9ssqnm5q (this is the change) - 0.001 BTC went to bc1pyfw56zu5vsq0ulu9kytasgw4xwnm3eysll6tfdz8d9gtht97k7tqxsz78n and this also seems to be Alice's wallet! So now I'm confused... how come these two wallets that I highlighted (the change from the first transaction and the receiver address from the second) aren't the same? Any ideas?
5 Reply Quote Share
w0lf404Hero Member
Posts: 801 · Reputation: 2381
#2Oct 11, 2022, 12:52 PM
First of all note that we can't be sure that which of the outputs is the change. We can only make assumptions. It's even possible that the sender has sent fund to two people in a single transaction and there is no change at all. Second, you can have any number of addresses you want and that's even recommended due to privacy reasons.
1 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#3Oct 14, 2022, 12:23 AM
Even better: your wallet does this on it's own by sending change to a new address each time. Don't confuse wallets for addresses: a wallet can hold many different addresses, and each address can receive many individual coins (UTXOs).
2 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#4Oct 14, 2022, 03:44 AM
All your educated guesses on which is change or not is why others called Bitcoin "pseudo-anonymous". Because even though every transactions are available in public, it's still not easy to tell which is which if the user/wallet do not reuse addresses. Such misconception must have been caused by not having first-hand experience on how wallets create transactions or from using wallets that only use single address. So, I'd recommend you to test it on a real Bitcoin wallet to better grasp the explanations. You can make transactions in testnet at no cost (just get some test coins from faucets online), the reference client "Bitcoin Core" (where you can also try RegTest) or "Electrum" supports it. How to run those clients in testnet/regtest: For Bitcoin Core: developer.bitcoin.org/examples/testing.htmlFor Electrum: start it with --testnet or --testnet4
2 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#5Oct 14, 2022, 05:37 AM
If you scan a QR-code (which I just misspelled as QR-coin), you can get some here.
2 Reply Quote Share
alt21Senior Member
Posts: 398 · Reputation: 1732
#6Oct 14, 2022, 07:12 AM
I also have some testnet Bitcoins that I can give: https://bitcointalk.org/index.php?topic=5533904.0 As far as the topic is concerned, I think Loyce and nc50lc covered it well.
0 Reply Quote Share
?Reply
Sign in to reply to this topic

Related topics