Blockchain-based Peer-to-Peer Transactions in Energy Systems