FOSS snippet included. Please use the code in the snippet. RYO code is copyrighted.
If you would like to invest in one of very few cryptonote currencies that does actual development, have a look at our website ryo-currency.comForeword
51% attacks stopped being a mere threoretical possibility and started to be a practical concern for smaller coins. While they can never be mitigated completely, the easiest and most lucrative avenue of attack is to strike at the rate-control algorithm using forged timestamps to print thousands of blocks very fast. To prevent this most nodes will not accept blocks that are more that a few minutes in the future (a.k.a Future Time Limit or FTL). In this article I will explain how to bypass FTL and how to mitigate that bypass.How to bypass FTL check Disable the FTL check on your local node Cut all connections to the network. Set the timestamp ahead X hours. Do whatever is needed to cheat the rate control algorithm. For Sumokoin algo that was alternating timestamps in 2-1 pattern. After X hours passed, you can online your node and let the others reorg to you. How to stop that attack
We can put a second layer of protection here on step 5. The critical issue is that the attacker needs our nodes to reorg to him. We can ask a question - "How likely is it that someone came up with 10,000 blocks in 5 hours, assuming that the rate control algorithm did not fail?".
While you are probably screaming "That assumption is wrong! It did fail!", those more scientifically inclined will recognise that assuming that the rate control algorithm did not fail is something we call a null hypothesis in statistics. Computers are not as smart as you and therefore we need to set out the question formally and dress it in something they understand (numbers).Prussian army to the rescue!
In the late 19th century statisticians started to...