erebus-attack / Bitcoin-Emulator

A comprehensive and accurate emulation of Bitcoin network implementation
MIT License
14 stars 5 forks source link

The attack success print statement is always True #8

Closed oisonan1999 closed 2 years ago

oisonan1999 commented 2 years ago

I ran all the cases like in your article. But never once have I seen a failed attack. Whether RAP is enabled or not. Can you explain?. And I want to ask is there any way to improve RAP's logic algorithm?

akshayeshenoi commented 2 years ago

We consider the attack to succeed if the attacker has occupied all outgoing connections before the end time of the simulation.

See https://github.com/erebus-attack/Bitcoin-Emulator/issues/4#issuecomment-1219359873.

oisonan1999 commented 2 years ago

But I find that in many cases where the attacker can't take over the entire connection, the attack is still logged as successful, why is that?

akshayeshenoi commented 2 years ago

Please attach the simulation output so I can examine it.

oisonan1999 commented 2 years ago

Here I tried giving 1 more log that is attack fails and the output is still successful. l3-amzn.txt

akshayeshenoi commented 2 years ago

Thank you for pointing out the behaviour. I have fixed the bug (#9) and merged into master.