A Decentralized Energy Trading System Based on Public Blockchain