Bitcoin Forum
May 06, 2024, 10:40:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 »  All
  Print  
Author Topic: Confirmation Time  (Read 3689 times)
Jace
Sr. Member
****
Offline Offline

Activity: 288
Merit: 251


View Profile
March 01, 2015, 04:52:46 PM
 #41

Nope. The gap between two blocks is indeed 10 minutes in average. But the confirmation time for any random transaction is also 10 min in average. May seem non-intuitive, but hey, maths (and more specifically: exponential probability distribution).

It indeed seems non-intuitive. Do you have the math ready up your sleeves?

Yep. The confirmation time is exponentially distributed with mean parameter λ-1 = 10 minutes. This means the expected waiting time for the next block to be mined, is always 10 minutes from now, regardless of when 'now' is (even if 'now' is already 9½ minutes after the last block was mined).

The actual calculation is here but this is just a common property of exponential probabilities, as is the case with a random continuous time process like Bitcoin mining.

The non-intuitive part probably comes from this: at frist, you may think that with an average block time of 10 minutes, and transactions being randomly broadcasted anywhere between the current (last known) block and the next, the average confirmation time would be 5 minutes. But this were only true if block times were uniformly distributed with a mean of 10 minutes. They're not. Some blocks may take only 2 or 3 minutes to be found, others may take more than 30. Both are exceptional, however with random transactions being continuously broadcasted, obviously there will be more in a 30 minute gap than in a 2 minute gap. It all evens out nicely.

Feel free to send your life savings to 1JhrfA12dBMUhcgh85wYan6HL2uLQdB6z9
1715035207
Hero Member
*
Offline Offline

Posts: 1715035207

View Profile Personal Message (Offline)

Ignore
1715035207
Reply with quote  #2

1715035207
Report to moderator
1715035207
Hero Member
*
Offline Offline

Posts: 1715035207

View Profile Personal Message (Offline)

Ignore
1715035207
Reply with quote  #2

1715035207
Report to moderator
1715035207
Hero Member
*
Offline Offline

Posts: 1715035207

View Profile Personal Message (Offline)

Ignore
1715035207
Reply with quote  #2

1715035207
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715035207
Hero Member
*
Offline Offline

Posts: 1715035207

View Profile Personal Message (Offline)

Ignore
1715035207
Reply with quote  #2

1715035207
Report to moderator
1715035207
Hero Member
*
Offline Offline

Posts: 1715035207

View Profile Personal Message (Offline)

Ignore
1715035207
Reply with quote  #2

1715035207
Report to moderator
inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
March 01, 2015, 04:55:47 PM
 #42

Approval times have nothing to do with confirmation times and most payment processor approve transaction in a second time when buying things with bitcoin.

As far as the math is concerned this has been discussed already Ad nauseam:

It's a Poisson process, with a mean of 10 minutes. So...

What is the probability that the next block will be found within 10 minutes from now?
63.212%

Or within 1 minute?
9.516%

Or 10 seconds?
1.653%

Or 1 second?
0.167%

These two statements appear to be in dissonance, but are both true:
  • The average time to solve a block is 10 minutes
  • Half the blocks will be solved in under 7 minutes

Obviously easy to confuse the two when calculating things.

So the chance a block won't be found after 10, 20 minutes, etc. (and the 1 in x chance)
Code:
>>> for x in range(10,131,10) :
print x, '%2.5f%%' % (100*math.exp(-x/10)), '%1.2f' % (math.exp(x/10))
10 36.78794% 2.72 (average block length)
20 13.53353% 7.39
30 4.97871% 20.09
40 1.83156% 54.60
50 0.67379% 148.41
60 0.24788% 403.43
70 0.09119% 1096.63
80 0.03355% 2980.96
90 0.01234% 8103.08
100 0.00454% 22026.47
110 0.00167% 59874.14
120 0.00061% 162754.79
130 0.00023% 442413.39


And after how many minutes will half of blocks, 25% of the blocks, etc. not be solved:
Code:
>>> for x in [ 10*math.log(2), 10*math.log(4), 10*math.log(8), 10*math.log(16), 10*math.log(32), 10*math.log(64)]:
print x, '%2.5f%%' % (100*math.exp(-x/10)), '%1.2f' % (math.exp(x/10))

   
6.9314718056 50.00000% 2.00 (median block length)
13.8629436112 25.00000% 4.00
20.7944154168 12.50000% 8.00
27.7258872224 6.25000% 16.00
34.657359028 3.12500% 32.00
41.5888308336 1.56250% 64.00



And every day we can reasonably expect a block longer than 49 minutes, every week one longer than 69 minutes, every month 83 minutes:
Code:
>>> for x in [ 10*math.log(144), 10*math.log(144*7), 10*math.log(144*365.25/12)]:
print x, '%2.5f%%' % (100*math.exp(-x/10)), '%1.2f' % (math.exp(x/10))

   
49.6981329958 0.69444% 144.00
69.1572344863 0.09921% 1008.00
83.8548870042 0.02282% 4383.00


I'm curious to see how an integrated histogram of actual block data matches up with this.

Of more significance, if the hash rate temporarily halves (miners quit, pool DDOS, etc) all times double.


Jace
Sr. Member
****
Offline Offline

Activity: 288
Merit: 251


View Profile
March 01, 2015, 05:04:46 PM
 #43

It's a Poisson process, with a mean of 10 minutes. So...
It's actually not a Poisson process (poisson = discrete number of events in fixed time interval, exponential = continuous time intervals between single events) but they're closely related.

Feel free to send your life savings to 1JhrfA12dBMUhcgh85wYan6HL2uLQdB6z9
tss
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500


View Profile
March 01, 2015, 05:15:27 PM
 #44

it was an exchange to exchange transaction so not sure if they included a TX fee or not.

don't blame the network for problems with third party transactions. 

did you buy your account?  for someone who has been a member for so long you sure don't seem to know anything.
inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
March 01, 2015, 05:18:09 PM
 #45

It's a Poisson process, with a mean of 10 minutes. So...
It's actually not a Poisson process (poisson = discrete number of events in fixed time interval, exponential = continuous time intervals between single events) but they're closely related.

Poisson distributions either use fixed time intervals or probabilistic average rates. Bitcoin is the latter.

https://en.wikipedia.org/wiki/Poisson_distribution

In probability theory and statistics, the Poisson distribution (French pronunciation [pwasɔ̃]; in English usually /ˈpwɑːsɒn/), named after French mathematician Siméon Denis Poisson, is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time and/or space if these events occur with a known average rate and independently of the time since the last event.

Jace
Sr. Member
****
Offline Offline

Activity: 288
Merit: 251


View Profile
March 01, 2015, 05:28:06 PM
 #46

It's a Poisson process, with a mean of 10 minutes. So...
It's actually not a Poisson process (poisson = discrete number of events in fixed time interval, exponential = continuous time intervals between single events) but they're closely related.

Poisson distributions either use fixed time intervals or probabilistic average rates. Bitcoin is the latter.

https://en.wikipedia.org/wiki/Poisson_distribution

In probability theory and statistics, the Poisson distribution (French pronunciation [pwasɔ̃]; in English usually /ˈpwɑːsɒn/), named after French mathematician Siméon Denis Poisson, is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time and/or space if these events occur with a known average rate and independently of the time since the last event.
Indeed, Poisson = the probability of a given number of events. Number being a discrete amount (0, 1, 2, 3, etc). Whereas exponential = the probability of the time or space between two subsequent events. Time or space being a continuous (real number) amount. Like I said, they're closely related (both deal with a known average rate, amongst other things), but the Bitcoin mining block time is really exponentially distributed.

The most important distinction between Poisson and Exponential is being a discrete vs continuous probability distribution.

Feel free to send your life savings to 1JhrfA12dBMUhcgh85wYan6HL2uLQdB6z9
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
March 01, 2015, 05:35:39 PM
 #47

This is why I like mathematicians - they create a model and analyze it without taking into account conditions of the real world... and suddenly come to a conclusion that doesn't make much sense.

As we know, block space is limited and confirmation of a single transaction depends on how many unconfirmed transactions are pending. Hence we can't use Poisson process that doesn't have memory. Hence your model can't be described as such a process. Try another model or extend the existing one.
inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
March 01, 2015, 05:44:46 PM
 #48

This is why I like mathematicians - they create a model and analyze it without taking into account conditions of the real world... and suddenly come to a conclusion that doesn't make much sense.

As we know, block space is limited and confirmation of a single transaction depends on how many unconfirmed transactions are pending. Hence we can't use Poisson process that doesn't have memory. Hence your model can't be described as such a process. Try another model or extend the existing one.

No one is suggesting that there aren't other factors such as mining pools/miners rejecting Txs, certain blocks hitting the 1MB limit, users not including proper Tx fees, dynamically changing difficulty rate within the retarget, ect...

This doesn't negate the reality that the Poisson distribution still represents a very useful probability curve which matches most real world confirmation times within the bitcoin ecosystem. One could create a more sophisticated algo which anticipated other variables like difficulty adjustments but the probabilistic accuracy wouldn't be much more accurate than the Poisson distribution.

This does bring up a very important weakness of bitcoin because the average person is horrible with math and probabilities which leads to threads like this. Most Wallets in the future should mask or hide confirmation times from the everyday user and include more intuitive ways or showing the users that a transaction can be trusted. There are many ways to do this with interchannel payments, sidechains, pre-signed txs, looking at the memory pool, and/or  a TaPoS layer.

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
March 01, 2015, 05:50:02 PM
 #49

No one is suggesting that there aren't other factors such as mining pools/miners rejecting Txs, certain blocks hitting the 1MB limit, users not including proper Tx fees, dynamically changing difficulty rate within the retarget, ect...

This doesn't negate the reality that the Poisson distribution still represents a very useful probability curve which matches most real world confirmation times within the bitcoin ecosystem. One could create a more sophisticated algo which anticipated other variables like difficulty adjustments but the probabilistic accuracy wouldn't be much more accurate than the Poisson distribution.

Unfortunatelly, I need to go afk for a while. Here is a spoiler, DO NOT HOVER THE NEXT LINK -> .

I hope to read better math when I'm back.
inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
March 01, 2015, 06:01:14 PM
Last edit: March 01, 2015, 06:12:14 PM by inBitweTrust
 #50

Unfortunatelly, I need to go afk for a while. Here is a spoiler, DO NOT HOVER THE NEXT LINK -> .

I hope to read better math when I'm back.

https://blockchain.info/charts/avg-confirmation-time?timespan=1year&showDataPoints=false&daysAverageString=1&show_header=true&scale=0&address=

Matches with what I posted if one assumes a flat difficulty. Difficulty has been increasing in Feb thus confirmation times are getting faster. Look at the average confirmation time in Jan and compare that to the difficulty swings within that month and you will see what I mean.

https://blockchain.info/charts/avg-confirmation-time?timespan=60days&showDataPoints=false&daysAverageString=1&show_header=true&scale=0&address=

https://bitcoinwisdom.com/bitcoin/difficulty

After the retarget on jan 12th increasing difficulty by 8.2% you can see the very next day confirmation time averages shoot up to 11 minutes because a ton of miners were pulled.

Confirmation time is 5 min in average. 10 minutes is the gap between blocks.

This is false. One should assume most confirmations to take ~7-8 minutes on average because of the Poisson distribution and difficulty increasing as a normal trend. I see that you seem to be suggesting that one should expect a confirmation in 5 minutes because of the tx happening at an arbitrary time during the blocks being processed but this only applies to the first confirmation and even so the correct response should have been that one should expect:

1) an average of half of the of the first confirmations to occur in ~3.5-4minutes
2) Subsequent confirmations on a Tx to occur with a probability of half being confirmed in ~6 to 7 minutes, with an total average of ~7.5 min

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
March 01, 2015, 07:01:09 PM
 #51

Unfortunatelly, I need to go afk for a while. Here is a spoiler, DO NOT HOVER THE NEXT LINK -> .

I hope to read better math when I'm back.

https://blockchain.info/charts/avg-confirmation-time?timespan=1year&showDataPoints=false&daysAverageString=1&show_header=true&scale=0&address=

Matches with what I posted if one assumes a flat difficulty. Difficulty has been increasing in Feb thus confirmation times are getting faster. Look at the average confirmation time in Jan and compare that to the difficulty swings within that month and you will see what I mean.

https://blockchain.info/charts/avg-confirmation-time?timespan=60days&showDataPoints=false&daysAverageString=1&show_header=true&scale=0&address=

https://bitcoinwisdom.com/bitcoin/difficulty

After the retarget on jan 12th increasing difficulty by 8.2% you can see the very next day confirmation time averages shoot up to 11 minutes because a ton of miners were pulled.

Confirmation time is 5 min in average. 10 minutes is the gap between blocks.

This is false. One should assume most confirmations to take ~7-8 minutes on average because of the Poisson distribution and difficulty increasing as a normal trend. I see that you seem to be suggesting that one should expect a confirmation in 5 minutes because of the tx happening at an arbitrary time during the blocks being processed but this only applies to the first confirmation and even so the correct response should have been that one should expect:

1) an average of half of the of the first confirmations to occur in ~3.5-4minutes
2) Subsequent confirmations on a Tx to occur with a probability of half being confirmed in ~6 to 7 minutes, with an total average of ~7.5 min


Your link doesn't show 10 min.

There is other logic behind 5 min. I took 7.5 average time and removed low-priority transactions (majority of which are without fees).

PS: Flat difficulty math is useless, we are talking about the real world, not about spherical horse in vacuum.
inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
March 01, 2015, 07:13:14 PM
 #52

Your link doesn't show 10 min.

There is other logic behind 5 min. I took 7.5 average time and removed low-priority transactions (majority of which are without fees).

PS: Flat difficulty math is useless, we are talking about the real world, not about spherical horse in vacuum.

The Poisson Distribution model is a good way of understanding the process, when other real world variables are accounted for the first confirmation should on average come in around 3.5-4 minutes and subsequent confirmations 7-8minutes when one pays the appropriate Tx fee.

By reviewing the Poisson Distribution model one would expect that every day we can reasonably expect a block longer than 49 minutes, every week one longer than 69 minutes, every month 83 minutes.

TX without any fee is lower than you suggest on average :





cshelswell (OP)
Hero Member
*****
Offline Offline

Activity: 615
Merit: 500


View Profile WWW
March 01, 2015, 07:20:00 PM
 #53

Firstly wouldn't this be an issue for BTC to ever be mainstream if you can't pay for things immediately in shops etc?
When will people ever learn before asking stupid questions... YOU CAN pay for things immediately in shops etc. Nobody EVER makes you wait for a confirmation when paying in a store.

Quote
Also I presume the confirmation time will take longer the bigger the difficulty?
The entire point of the difficulty is actually to keep the confirmation time at 10 minutes.

Quote
I think i've understood how it works correctly?
Nope.

Erm wasn't sure it was a stupid question, it was a question, asked to better educate myself. thanks for your input but I think there have been some far more helpful and less derogatory answers.

jeffhuys
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
March 01, 2015, 07:22:08 PM
 #54

Well you only require 2 confirmations to avoid double spending. So you don't really need 6 confirmations all the time.

But wouldn't that still be 20 minutes (on average)?

inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
March 01, 2015, 07:27:25 PM
 #55

Well you only require 2 confirmations to avoid double spending. So you don't really need 6 confirmations all the time.

But wouldn't that still be 20 minutes (on average)?

I don't know where the 2 confirmation rule came from but it is false as double spending can theoretically happen even after 30 confirmations with a successful attack.

Technically, you can avoid double spending with a high degree of confidence with 0 confirmations by a simply query to other nodes' mempool via BIP035.  Mycelium local trader does this with the “Transaction Confidence” bar and payment processors like bitpay do.

The first 2 confirmations on average will appear in 11-12 minutes lately if you pay the right Tx fee. 1st one 3.5-4min , 2nd one 7-8min. If you understand the Poisson distribution you should expect that sometimes you will see 2 confirmations come in within 10 seconds and sometimes take over 1 hour.

Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
March 01, 2015, 07:31:44 PM
 #56

The Poisson Distribution model is a good way of understanding the process...

Noone says that Poisson can't be used for that.
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1001



View Profile
March 01, 2015, 07:34:25 PM
 #57

Erm wasn't sure it was a stupid question, it was a question, asked to better educate myself. thanks for your input but I think there have been some far more helpful and less derogatory answers.
OK, true, well yeah sorry about that, it's just you are the 100000th person here asking questions already assuming that you can't pay for things immediately in shops, which (based on that false premise) kinda makes the question irrelevant. I've seen hundreds of topics with wrong implications (e.g. "can Bitcoin be used for every day shop payments?" would be better) and hate the wrong impression this can give about Bitcoin to others.
But apologies for the condescending tone, and kudos for the self educating good sir.

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1001



View Profile
March 01, 2015, 07:36:23 PM
 #58

Well you only require 2 confirmations to avoid double spending. So you don't really need 6 confirmations all the time.
Why would you require more than one?

And again, seriously, in 99.999% of all cases you need zero confirmations to avoid double spending.

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1001



View Profile
March 01, 2015, 07:42:13 PM
 #59

No. Creditcards take 6-12 months for their first confirmation, I dont see anyone complaining about that or any customers camping 6 months because they paid for a coffee with a CC.

Credit cards take 5 sec for their first confirmation.
Well, that's really not a 'confirmation' in the sense of 'becoming irriversible' of 'going from pending to permanent' (as is the case with Bitcoin).

I'd say this pretty much sums it up:

Transaction time (the time it takes to process a payment)
Bitcoin: 1-2 sec
Credit card: 3-5 sec

Money arrival time (the time at which the merchant actually receives the money and can spend it)
Bitcoin: 1-2 sec
Credit card: several business days

Confirmation time (the time at which the merchant can be sure the payment won't be reversed)
Bitcoin: 10 minutes
Credit card: 6+ months

So, what was the problem with Bitcoin, again?

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
March 01, 2015, 07:49:49 PM
 #60

I'd say this pretty much sums it up:

Transaction time (the time it takes to process a payment)
Bitcoin: 1-2 sec
Credit card: 3-5 sec

Money arrival time (the time at which the merchant actually receives the money and can spend it)
Bitcoin: 1-2 sec
Credit card: several business days

Confirmation time (the time at which the merchant can be sure the payment won't be reversed)
Bitcoin: 10 minutes
Credit card: 6+ months

So, what was the problem with Bitcoin, again?

Your data is wrong, already discussed. Validation happens within 5 sec, money can be spent in 20 minutes. http://www.rbinternational.com
Pages: « 1 2 [3] 4 »  All
  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!