# Energy Blockchain for Public Energy Communities
## 2 Materials and Methods
### Validated Sensor Power/Energy Values Readings as Open Data on Distributed Ledgers  
The proposed platform wants to exploit IoT and blockchain technologies for finding a solution to the existing societal, environmental, and ethical issues which arise from the current limited open data and transparency efforts made by public administrations.  
In particular, this paper wants to propose a direct application of distributed ledgers for enabling open data of public institutions. The existing projects in this field show several difficulties which have been only partially solved by the existing technologies [5; 22], such as:  
1. The availability of certified open data has always been a central point for the improvement in research and transparency; nevertheless, few repositories of this type exist, and none of them are maintained and populated enough. The centralization of the control of these repositories, being it public or private, can be seen as one of the main reasons of this, since their value tend to decrease if the interest and support of the maintaining party decreases (or terminate, in case of public grants).
2. Commonly, the available open data is given in aggregated form, mainly provided and analyzed by the providing institution and does not exist on a public platform in which it is possible to analyze the raw data in a common format, as well as peer review the performed evaluations.
3. The data is not provided in real time, and it is very hard to obtain data which is certified as completely reliable and provided in a common standard data type, and
4. the upload of open data is completely voluntarily and not automatic, since the data should be acquired, evaluated, and reshaped before sharing it on the existing repositories. This effort can be very difficult to perform since not all institutions have the resources to properly perform such tasks.  
In this context, the proposed platform wish to solve this issues creating a decentralized platform not relying on a central managing authority, able to provide certified (by the certified meters) raw data in standardized formats. In addition, the same platform will enable the calculation of elaborated data coming from the raw one, provided by recognizable trusted parties, published on the blockchain and subject to peer review. Finally, the upload of the raw data will be made in a completely automated way from the installed smart meters, overcoming the need of an internal effort in the institutions, and simplifying the sharing of the information.  
The BSMs, smart meters enriched with a blockchain enabler module, will work as distributed nodes of a multi-channel platform built for metering and acquiring energy and power and, finally, storing the readings on a distributed ledger. These BSMs combine \"classic\" smart metering capabilities and the ability to store and share consumption (and production) power/energy readings with the possibility to write this information on a decentralized, trustful and immutable blockchain platform [6; 26].  
They can either work as a full or light node, depending on the available connection and bandwidth (more details about this choice are given in Section 3.2) [25].  
The availability of reliable BSMs in each building of the LEC allowed the sharing of production and consumption data of the public buildings in which they are installed. Once certified and timestamped on a distributed ledger, this data can be made freely available to the interested audience, aiming to verify and control public good use [12; 25; 27].  
In the proposed approach, BSMs will have a double role: smart meters for the metering of users' production and consumption, and blockchain nodes. The BSMs, distributed among the participating institutions, will work as blockchain nodes, ensuring the decentralization of the process. In addition, having access to the blockchain, they will be able to save the readings of their sensors on the distributed ledger. A scheme of this vision in given in Figure 1.