Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: tobasco on October 23, 2019, 04:13:56 PM



Title: Mathematics of generating an alternate chain (Bitcoin whitepaper).
Post by: tobasco on October 23, 2019, 04:13:56 PM
I've been looking at the equations from the bitcoin whitepaper. It gives the following probabilities of "catching up" from z blocks behind (with my 0.1 probability of mining a block) as follows:

Code:
q=0.1
z=0    P=1.0000000
z=1    P=0.2045873
z=2    P=0.0509779
z=3    P=0.0131722
z=4    P=0.0034552
z=5    P=0.0009137
z=6    P=0.0002428
z=7    P=0.0000647
z=8    P=0.0000173
z=9    P=0.0000046
z=10   P=0.0000012

However, if I want to replace the top block in the chain, catching up isn't going to be enough as I need to build a longer chain for other nodes to adopt.

So would it by correct to say my probability of replacing the top block in the chain would be:

Code:
z=2    P=0.0509779

Because I need to build a chain one block longer than the number of blocks I need to catch up with. Is that correct?