Compared with traditional power systems, smart grid is designed to provide effective and secure energy services. Data aggregation is one of the key technologies in wireless sensor networks, which reduces the amount of data transmission between nodes by merging similar data and simplifying redundant data, thus significantly reducing the computation cost and communication overhead of the system. Many data aggregation schemes have been developed for the smart grid in the past years. However, most of the data aggregation schemes ignore the data security and privacy protection issues of the edge layer. To solve these problems, in this article, we propose an edge blockchain assisted lightweight privacy-preserving data aggregation for smart grid, named EBDA. In this work, we integrate edge computing and blockchain to design a three-layer architecture data aggregation scheme for smart grid. This new architecture supports a two-level data aggregation scheme, which is more efficient and secure. Through theoretical analysis and simulations, EBDA shows great superiority in terms of resisting network attacks, reducing system computation costs and communication overhead compared with existing schemes.