Bitcoin Forum
April 27, 2024, 02:24:14 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [Quiz] Answer the Bitcoin question and earn merits! #1  (Read 627 times)
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5213



View Profile
March 19, 2024, 02:42:21 PM
 #21

hosseinimr93 After seeing your algorithm, I tried to do it in C++, but I don't understand why it's getting a minus. I tried with the help of that source, but the answer was a minus.
I am not familiar with C++, but I feel you are calculating the exp_term wrongly.



You are totally right BlackHatCoiner but those are 2 different things, one thing is the 51% attack, where the miners can modify confirmed blocks, and the second thing is the double spend where the user modifies the unconfirmed transaction.
I think you didn't understand BlackHatCoiner well.
Any mining pool can try to perform a 51% attack and you don't have to own more than 51% of the total hash power to do that. That's what BlackHatCoiner says. He didn't say anything about double-spending.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714227854
Hero Member
*
Offline Offline

Posts: 1714227854

View Profile Personal Message (Offline)

Ignore
1714227854
Reply with quote  #2

1714227854
Report to moderator
1714227854
Hero Member
*
Offline Offline

Posts: 1714227854

View Profile Personal Message (Offline)

Ignore
1714227854
Reply with quote  #2

1714227854
Report to moderator
1714227854
Hero Member
*
Offline Offline

Posts: 1714227854

View Profile Personal Message (Offline)

Ignore
1714227854
Reply with quote  #2

1714227854
Report to moderator
franky1
Legendary
*
Offline Offline

Activity: 4200
Merit: 4447



View Profile
March 19, 2024, 07:11:40 PM
Last edit: March 19, 2024, 08:14:56 PM by franky1
 #22

sorry to have to correct you but
You are totally right BlackHatCoiner but those are 2 different things, one thing is the 51% attack, where the miners can modify confirmed blocks, and the second thing is the double spend where the user modifies the unconfirmed transaction.
I think you didn't understand BlackHatCoiner well.
Any mining pool can try to perform a 51% attack and you don't have to own more than 51% of the total hash power to do that. That's what BlackHatCoiner says. He didn't say anything about double-spending.

Question: The dominant mining pool, at the time of writing this, turns evil and uses its hash-power to reorg the chain. A customer of yours sends you a transaction. If you wait for 10 confirmations, what is the chance that the dominant mining pool successfully double-spends / reverses your transaction?

a chain re-org could include all original chain transactions but just change the pool reward address to the malicious pool.. thus win all the rewards for 10 blocks
but altering-removing transactions then allows transactions that were deemed as spent. to then be unspent, to then be able to be spent again later. so they are 2 different things and yes blackhat did mention double spends. not just chain re-orgs for personal gain of rewards

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1498
Merit: 7292


Farewell, Leo


View Profile
March 19, 2024, 08:01:34 PM
Last edit: March 19, 2024, 08:25:22 PM by BlackHatCoiner
Merited by vapourminer (1), hosseinimr93 (1)
 #23

You are totally right BlackHatCoiner but those are 2 different things, one thing is the 51% attack, where the miners can modify confirmed blocks, and the second thing is the double spend where the user modifies the unconfirmed transaction.
That is correct. The miner does not double-spend; it gives the user the option to double-spend. I think, though, that I have clarified it enough, because I mentioned "reversal" alternatively to "double-spend". Whether the miner double-spends or "simply" reverses, the result is that your coins are prone to double-spending.

hosseinimr93 After seeing your algorithm, I tried to do it in C++, but I don't understand why it's getting a minus. I tried with the help of that source, but the answer was a minus.
The reason is probably because you're subtracting from 0 (see the definition of result and which operations you're doing to it). I cannot see, though, if you're printing result or 1-result.

Here you go. I have commented the important parts.
Code:
#include <iostream>
#include <cmath>
using namespace std;

// constant number 'e'
const double Euler = std::exp(1.0);

// factorial of integer x
int fact(int x){

    int i, factorial = 1;
    for(i = 1; i <= x; i++)
        factorial *= i;

    return factorial;
}

int main(){
    // q = the proportion of hashrate the attacker possesses
    // z = the total confirmations
    double q = 0.4;
    int z = 6;

    double p = 1 - q;
    double lambda = z*q/p, sum = 0;

    int k;
    for(k = 0; k <= z; k++){
        // build the fraction first
        double fraction = pow(lambda, k) * pow(Euler, -lambda);
        fraction /= fact(k);

        // sum is sum + fraction * (...)
        sum += fraction * (1 - pow((q/p), z-k));

    }

    // print
    cout << 1 - sum << endl;
}

Compile with "g++ -o attack attack.cpp" and run with "./attack".

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1498
Merit: 7292


Farewell, Leo


View Profile
March 20, 2024, 11:15:02 AM
 #24

New quiz!

https://bitcointalk.org/index.php?topic=5489635.0

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!