A Survey on Attacks of Bitcoin