Hey everyone. Got a quick question about bitcoin transactions. If I send 1 bitcoin from my 10, does it create three entries? Like one for spending, one for you, and one for my change?
Understanding Spend and Change Addresses in Bitcoin
9 replies 402 views
Well, not exactly. Addresses are a bit abstract. Blockchain just has unspent outputs. You don’t create three entries, just one transaction showing the unspent output being spent and the new ones being created.
It's true, but the terminology can be misleading. Those are just terms we use to explain what’s happening. It’s one transaction with inputs and outputs, not three separate entries.
So, the spend and change addresses have their own private keys? I thought they came from the same one. How does that work in hardware wallets like Ledger?
Not entirely. P2PKH has been around for a while, but the concept of addresses evolved. They’re hashed versions of public keys now. And HD wallets can generate many pairs from a master key.
Got it, thanks for clarifying. I didn’t know about the master public key in HD wallets. Really helpful info!
Just a quick note, in those HD wallets, the addresses follow specific paths like m/purpose'/coin'/account'/chain_index/address_index. Each change address is derived from an internal chain.
Good point about mentioning transaction fees in your talk. It’s not cheap to send bitcoin sometimes.
Right. Those entries are all part of the same transaction. It’s about inputs and outputs. And it’s scripts, not addresses, that the blockchain directly interacts with.
gwei_blockNewbie
Posts: 187 · Reputation: 37
#10Nov 14, 2023, 03:58 PM
True that. We've had some crazy times with transaction fees lately. They're calming down now, but I don't think we'll see super low fees anytime soon.
Related topics
- Creating Custom Bitcoin Addresses with Vanitygen 20
- New Bitcoin Improvement Proposal with $100 Reward 9
- Understanding the Differences Between Traditional and Simplified Chinese Mnemonics 6
- Running Bitcoin Core on a Laptop with Limited Storage 20
- Slow Sync Issues with Bitcoin Core 4
- Understanding Square and Cube Roots in secp224k1 6