Bitman2k
Posts: 3
Joined: Sun Oct 02, 2016 2:42 pm

BTC Transaction related question

Sun Oct 02, 2016 2:57 pm

I read the white paper and still have some questions. The first ones are about the transactions:

1) Let's say Bob has 2 BTC and Alice has 0. Bob wants to send to Alice 1.5 BTC. According to the principals of the protocol, 1 input = 1 output, in the other words, Bob has only 1 input transaction for 2 BTC, so he can't send 1.5 BTC, he must send 2 BTC. I found that this problem gets resolved by a Change, meaning that after Bob sends 2 BTC, he will get back a change in the amount of 0.5 BTC.
The problem is that Alice has 0 BTC, she has no BTC for the change. So I don't understand how this situation gets resolved.

2) I understood that for each transaction the wallet creates a new Address. So let's say Bob has the address Addr1. He sends the BTC to Alice, however, the wallet creates a new address: Addr2 and then uses it just 1 single time for this transaction.
So my question here is how the money gets transferred internally from Bob's Addr1 to Bob's Addr2 before broadcasting this transaction?
The block chain shows some like this:
Some_address - > Bob's Addr1

Or the addresses have nothing to do with the rights on the BTCs?

bitaps.com
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Tue Oct 18, 2016 1:18 pm

Donate BTC of your choice to 1TipsnxGEhPwNxhAwKouhHgTUnmmuYg9P

Re: BTC Transaction related question

Wed Oct 19, 2016 10:54 am

1.
Bitcoin protocol no limit on quantity of inputs or outputs, only limit on transaction size ( 100 Kbyte standard transaction rules, non standard transaction limited block size 1 Mbyte)
So when Bob sent to Alice 1,5 BTC when Bob has only 2 BTC coin, he have to create transaction with 1 input 2BTC and 2 outputs 1,5 BTC to Alice address and 0,5 BTC to Bob address (change).


2. Wallet create new addresses according BIP 32, but when new address created it does not mean that all coins moved to new address. Wallet continue monitoring previous addresses and all unspent coins located on previous addresses. In case Bob want move coins to new Wallet address he should create transaction and broadcast transaction to network. Read more about HD Wallet to understand how it works.

Return to “Development & Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests