This paper investigates a double auction-based peer-to-peer (P2P) energy trading market for a community of renewable prosumers with private information on reservation price and quantity of energy to be traded. A novel competition padding auction (CPA) mechanism for P2P energy trading is proposed to address the budget deficit problem while holding the advantages of the widely-used Vickrey-Clarke-Groves mechanism. To illustrate the theoretical properties of the CPA mechanism, the sufficient conditions are identified for a truth-telling equilibrium with a budget surplus to exist, while further proving its asymptotical economic efficiency. In addition, the CPA mechanism is implemented through consortium blockchain smart contracts to create safer, faster, and larger P2P energy trading markets. The proposed mechanism is embedded into blockchain consensus protocols for high consensus efficiency, and the budget surplus of the CPA mechanism motivates the prosumers to manage the blockchain. Case studies are carried out to show the effectiveness of the proposed method.