Blockchain is increasingly being used to provide a distributed, secure, trusted, and private framework for energy trading in smart grids. However, existing solutions suffer from a lack of privacy, processing and packet overheads, and reliance on trusted third party (TTP) to secure the trade. To address these challenges, we propose a secure private blockchain (SPB) framework. SPB enables energy producers and consumers to directly negotiate the energy price. To reduce the associated overheads, we propose a routing method which routes packets based on the destination public key (PK). SPB eliminates the reliance on TTP to ensure both energy producer and consumer commit to their obligations by introducing atomic meta-Transactions. The latter consists of two transactions: first the consumer generates a CTP transaction, committing to pay the energy price to the producer. On receipt of the energy, the smart meter of the consumer generates an energy receipt confirmation (ERC) which triggers a smart contract to transfer the committed price in CTP to the energy producer. To verify that the ERC is generated by a genuine smart meter, SPB supports authentication of anonymous smart meters to prevent malicious nodes from linking ERC transactions and thus enhance the user privacy. Qualitative security analysis shows the resilience of SPB against a range of attacks. Implementation results demonstrate that SPB reduces monetary cost and delay compared to existing solutions.