Smart grid is the intelligence of the grid, which can realize fine-grained smart metering, facilitates the intelligent generation, distribution, and management of electricity. Data aggregation is one of the most effective methods to protect privacy and security. The fault tolerance is very important to improve the robustness of data aggregation scheme. Since all smart meters work around the clock, it is inevitable that some smart meters will fail. Existing solutions generally require the deployment of a trusted authority, which is impractical. Blockchain is a decentralized protocol in which data on the chain cannot be changed or forged. Therefore, this paper proposes a fault-tolerant privacy protection data aggregation scheme for smart grid based on blockchain. The security analysis shows that the scheme meets the privacy and security requirements of data aggregation in smart grid.