The concept of the internet of energy (IoE) emerged as an innovative paradigm to encompass all the complex and intertwined notions relevant to the transition of current smart grids towards more decarbonization, digitalization and decentralization. With a focus on the two last aspects, the amount of intelligent devices being connected in a scattered way to the existing power grid is ever-growing. Nevertheless, guaranteeing a cyber-secure and resilient control of these IoE components as well as a seamless and reliable delivery of electricity services, such as renewable energy exchange, electric vehicles charging, demand response, and so forth; might be the bottleneck of current power systems that are largely still functioning following a centralized approach. Thus, the future power grid would gradually incorporate a growing number of distributed-based control schemes to deal with this challenge. And many believe that blockchain could be a key-enabler in this transition, due to its consistent characteristics with multiple requirements of future power systems. In this paper, we provide an extensive state-of-the-art of blockchain-based additions to the IoE. Where, we first introduce various concepts related to blockchain and discuss the rationale behind its adoption in the context of IoE. Then, differently from the existing body of literature surveys, we do not only provide a taxonomy and evaluate a wide range of recent research outputs that integrated blockchain within modern power systems. But we also draw some valuable lessons learned for each studied category and discuss the intersection of blockchain with various emerging paradigms that have the potential of radically impacting the smart grid. In addition, we present some real-world industrial initiatives and ongoing projects built on top of blockchain, dedicated for offering diverse electricity services with a case study of a pilot project on energy trading in Amsterdam. Finally, we discuss the remaining challenges and worthwhile opportunities of deploying blockchain in this particular area, with a focus on the aspect of operational cyber-security.