Bitcoin Forum
May 21, 2024, 11:38:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Effects of network propagation delay  (Read 1411 times)
justusranvier (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
October 27, 2012, 09:00:07 PM
 #1

As of block B my address A has a balance of 10 BTC.

I decide to spend some of it so my client generates and broadcasts a transaction (T1) with a 1 BTC output to destination address D and 9 BTC to change address C. At approximately the same time someone else broadcasts a transaction (T2) with a 5 BTC output to address A.

The miner which ultimate solves (B+1) includes T2 in the block but not T1 because it saw T2 first and had already started working on the block before T1 arrived.

T2 gets included in (B+1). T1 gets included in (B+2).

As of (B+3) what is the balance of address A?
grau
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1021


bits of proof


View Profile WWW
October 27, 2012, 09:14:12 PM
 #2

T1 refers to the output of certain previous transactions not some "current" balance of A.

Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
October 27, 2012, 09:18:44 PM
 #3

As of block B my address A has a balance of 10 BTC.

I decide to spend some of it so my client generates and broadcasts a transaction (T1) with a 1 BTC output to destination address D and 9 BTC to change address C. At approximately the same time someone else broadcasts a transaction (T2) with a 5 BTC output to address A.

The miner which ultimate solves (B+1) includes T2 in the block but not T1 because it saw T2 first and had already started working on the block before T1 arrived.

T2 gets included in (B+1). T1 gets included in (B+2).

As of (B+3) what is the balance of address A?

5 BTC on A at B+3.
The 10 BTC you had previously were sent 1 BTC to D and 9 BTC to C at B+2.
justusranvier (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
October 27, 2012, 09:21:36 PM
 #4

T1 refers to the output of certain previous transactions not some "current" balance of A.
Thank you. So the answer is 5.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
November 01, 2012, 02:14:23 PM
 #5

. . .Thank you. So the answer is 5.
Yes, but only so long as the entire 10 BTC balance at address A in the beginning of this process was all received in a single previous transaction.

Here is another example:

Prior to Block B, I receive 2 separate transactions (Ta and Tb) at address A for 5 BTC each.

As of block B my address A has a balance of 10 BTC.

I decide to spend some of it so my client generates and broadcasts a transaction (T1) using one of these 5 BTC previous outputs (Tb) as an input with a 1 BTC output to destination address D and 4 BTC to change address C. At approximately the same time someone else broadcasts a transaction (T2) with a 5 BTC output to address A.

The miner which ultimate solves (B+1) includes T2 in the block but not T1 because it saw T2 first and had already started working on the block before T1 arrived.

T2 gets included in (B+1). T1 gets included in (B+2).

As of (B+3) what is the balance of address A?

In this case the balance of address A is 10 BTC. (Consisting of 2 separate 5 BTC outputs)
The balance of address B is 1 BTC
The balance of address C is 4 BTC
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!