Introduction
In recent years, blockchain, as the underlying technology of Bitcoin and other crypto-currencies, has attracted significant attention. Academia and industry are trying to apply the promising technology into many areas, such as Internet of Things and smart cities. Blockchain has many good features, such as trust-free, transparency, anonymity, democracy, automation, decentralization and security. Trust-free means that blockchain systems can run normally in a peer-to-peer manner without a reliable third party. Blockchain enables everyone to access all transaction records, which makes it transparent. The anonymity can be realized by recording transactions using public anonymous addresses and keeping nodes' real-world identities hidden. In blockchain systems, decisions are made by all nodes, which makes it democratized. Smart contracts have the ability to perform transaction generation, decision making and data storage automatically. The decentralization of blockchain systems makes it necessary to ensure consistency by running consensus algorithms among decentralized nodes. The security of blockchain systems is related to integrity, confidentiality and authorization.