Bitcoin Forum
May 17, 2024, 05:04:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Trying to understand double spending after 1 confirmation.  (Read 253 times)
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18515


View Profile
July 15, 2023, 02:29:29 PM
Merited by LoyceV (2), tranthidung (1)
 #21

I tried, but got different numbers. How did you calculate this?
Those two particular examples I simply lifted from page 8 of the the whitepaper. For q=0.3 (an attacker with 30% of the hashrate), the probability (P) they overturn 10 confirmations (z=10) is 0.0416605, which is 4.16605%.

The equation itself is also given in the whitepaper, but rather than calculate it manually you can just plug your numbers in here: https://web.archive.org/web/20181231045818/https://people.xiph.org/~greg/attack_success.html
tranthidung
Legendary
*
Offline Offline

Activity: 2282
Merit: 4014


Farewell o_e_l_e_o


View Profile WWW
July 15, 2023, 03:38:15 PM
 #22

Loyce,

You can check it with Lopp's Bitcoin confirmation risk calculator too
https://jlopp.github.io/bitcoin-confirmation-risk-calculator/
https://github.com/jlopp/bitcoin-confirmation-risk-calculator

Lopp has an account in Bitcointalk and replied when he fixed a bug in his tool.
The rounding error was an unintentional result of me taking the form input and running it through parseInt, which truncates all decimal precision. I've changed that to parseFloat - the discrepancy is now resolved.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
Pages: « 1 [2]  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!