Next Article in Journal
Prex-Net: Progressive Exploration Network Using Efficient Channel Fusion for Light Field Reconstruction
Next Article in Special Issue
A Descriptive-Predictive–Prescriptive Framework for the Social-Media–Cryptocurrencies Relationship
Previous Article in Journal
Design of Hardware IP for 128-Bit Low-Latency Arcsinh and Arccosh Functions
Previous Article in Special Issue
Transforming Airport Security: Enhancing Efficiency through Blockchain Smart Contracts
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Blockchain Technology for Monitoring Energy Production for Reliable and Secure Big Data

by
Marco Gerardi
1,*,
Francesca Fallucchi
1,2 and
Fabio Orecchini
1
1
Department of Engineering Science, Guglielmo Marconi University, 00193 Rome, Italy
2
Leibniz Institute for Educational Media, Georg Eckert Institute, 38118 Brunswick, Germany
*
Author to whom correspondence should be addressed.
Submission received: 30 September 2023 / Revised: 9 November 2023 / Accepted: 10 November 2023 / Published: 15 November 2023

Abstract

:
The growing adoption of renewable energy sources and the need for more efficient and secure energy grids are revolutionizing the energy sector. Electricity monitoring becomes an issue of utmost importance, as current traditional energy meters have several problems in terms of lack of transparency, very high operational costs, and the possibility of being easily tampered with. This paper proposes a new system for electricity production metering that leverages blockchain and IoT for decentralized and secure data recording while protecting user privacy and reducing operational costs. The architecture results in improvements over the traditional energy meter. The system also contributes to the generation of big data that is reliable, traceable, error-proof, and highly resistant to cyber attacks. The architectural project outputs are a smart energy meter, a smart contract on the Ethereum blockchain, and a decentralized application to manage the information recording. The experimental prototype outcomes confirm the use of these new technologies to improve energy metering, enhancing efficiency, transparency, and traceability, with reduced costs and increased user privacy.

1. Introduction

The energy industry is currently experiencing a significant shift due to the growing use of renewable energy sources [1] and the need for more reliable and efficient energy grids [2]. Two emerging technologies, big data and blockchain, have the potential to transform the sector [3,4,5,6]. Big data refers to the collection and analysis of large datasets. It can be applied to enhance energy efficiency [7], optimize grid operations [8], and create new energy products and services. Blockchain is a distributed ledger technology that can securely store and share data. It is useful for applications that require a high level of trust, such as energy metering [9], energy trading [10], and grid management [11]. Electricity metering is a critical aspect of the energy market. It is used to accurately measure and bill the consumption or production of electricity. However, traditional electricity metering systems suffer from several challenges, such as high costs, a lack of transparency, and the possibility of tampering [12]. Blockchain technology has emerged as a promising solution to address these challenges by providing a secure and transparent platform for recording and managing transactions. On the other hand, IoT devices offer the ability to collect and transmit real-time data cost effectively and efficiently [13]. The Ethereum blockchain is particularly well suited for energy metering due to its support for smart contracts [14]. Smart contracts are self-executing contracts, with the terms of the agreement between buyer and seller being directly written into lines of code. The Ethereum blockchain allows for the creation of decentralized applications (DApps) [15] that can execute smart contracts securely and transparently, without intermediaries.
In this paper, we propose a novel approach to electricity metering that leverages the advantages of both blockchain and IoT technologies to produce reliable and traceable [16] data useful for creating reliable and secure big data. Specifically, we use the Ethereum blockchain [17] to record electricity production data in a secure, decentralized, and transparent way. The use of a public blockchain is discouraged due to transaction costs [18] and a lack of user privacy, so it is preferable to adopt a permissioned blockchain where access and read/write data control is enabled [19]. The proposed system is designed to facilitate the tracking and metering of electricity between producers and the energy supplier or regulatory entity, as well as between different parts of the grid. Our system utilizes a decentralized application and a smart contract that sets the guidelines and parameters for electricity metering. The app records the electricity generation captured by the sensor and supplements it with relevant metadata, such as the type of energy production (wind, solar, etc.), the time frame, and the production location. The information packet is then sent to the smart contract, which guarantees secure and transparent data storage on the blockchain. Our prototype can operate seamlessly with any Ethereum Virtual Machine (EVM) compatible blockchain [20]. To collect and transmit electricity consumption data, we utilize IoT devices. This is because the majority of energy meters currently in use cannot execute source code or have the computing capability to write to a blockchain. Moreover, integrating an IoT device with a smart meter is a simple process. Currently, there is no direct connection between electricity production and consumption, making it difficult to verify whether the renewable energy a consumer buys comes from a specific source. However, the proposed infrastructure could provide this information, increasing consumer confidence and the credibility of the company selling renewable energy. A consumer can also receive certified timestamped information concerning the electricity they are purchasing by knowing in detail the specific sources of origin [21]. The purchase can be integrated with identifiable links to specific renewable energy sources by leveraging transaction logs provided by the blockchain [22].
To summarize, our system proposes a new way of measuring electricity production through the use of blockchain and IoT, overcoming the limitations of traditional electricity meters. Energy production data are permanently stored within the blockchain and therefore acquire all those characteristics specific for distributed ledgers such as (A) the safety of the data against tampering or cyber-attacks; (B) the transparent nature of the information contained within the ledger, which allows authorized users access to the information and control of their data; and (C) the ability to track the operation that was performed and the data that were entered with confidence due to timestamps and digital signatures. The data thus produced are reliable as they are difficult to manipulate or alter by either outsiders or system users; they are traceable as it is possible to identify who entered the data into the register and when it was performed securely and reliably. Human error is minimized since the interaction is not required throughout the data production and transcription flow, avoiding, for example, the manual transcription of meter readings. Having accurate and traceable data is crucial for producing high-quality big data, which is essential for performing analysis and training artificial intelligence models [23,24,25]. The proposed system, in addition to capturing hourly energy production, enriches the information with data on the energy producer, the source type from which it was derived (solar, wind, etc.), and the plant’s source area. If additional metadata need to be included, the system would be easily expandable to allow the addition of new information fields. This information is crucial to ensure the traceability of produced energy so that a buyer is guaranteed to purchase clean, renewable energy. This approach could revolutionize the energy market as, nowadays, more and more consumers are paying attention to the environmental impacts of the energy they purchase. This information increases the credibility of energy-selling companies as well as fosters a customer-driven market with significant positive impacts for the consumer. Customers may choose the energy they purchase by favoring those producers and distributors who are virtuous and environmentally conscious. By using a distributed system, the single point of failure can be addressed, thereby reducing the associated costs of managing data redundancy, maintenance, and IT infrastructure security. The use of anonymous identification codes also protects the energy producers’ identity, ensuring their privacy and identification only to authorized individuals. Additional protection systems, such as two-factor authentication, and encryption of both in-transit information and information written to the distributed ledger, could be adopted to increase the system’s security [26,27]. In addition, the whole system can operate securely even without an Internet connection as data can travel over electric cables using PLC (Power Line Communication) or BPL (Broadband over Power Lines) technology, also called EOP (Ethernet Over Power), thus reaching even rural or isolated areas. Finally, the proposed project is fully open source, so there are no subscription or management costs to bear.
The paper is organized as follows: Section 2 presents related work, while Section 3 provides information on blockchain, smart contracts, IoT, and the energy system. The methodology is explained in Section 4, and the results are presented in Section 5. Furthermore, the discussion is presented in Section 6, and conclusions and future work are outlined in Section 7.

2. Related Work

Several studies have investigated the potential applications and benefits of blockchain and big data in the energy sector, as well as the challenges and limitations of their adoption. As early as 2015, Swan [28] studied the use of blockchain in the energy sector. In this work, it is argued that blockchain technology can enable people to participate in energy trading and management in a decentralized and democratic energy system. It is also pointed out that blockchain can facilitate the integration of renewable energy, creating new business models in the energy sector. Since then, several studies have investigated the use of blockchain in specific applications in the energy sector, such as peer-to-peer energy trading [10], energy data management [29,30], grid optimization [31], and energy tracking [32]. These studies have shown that blockchain can enhance the security, transparency, and efficiency of energy transactions, as well as enable new forms of energy management and trading. Mengelkamp et al. [33] presented a design and a simulation for a decentralized local energy market using blockchain technology with a preliminary economic evaluation. In parallel, interest in using big data in the energy sector is growing. Several studies have investigated the potential of big data analytics for energy management and optimization, such as demand response [34], energy forecasting [35], and renewable energy integration [36]. These studies have shown that big data can provide valuable insights for energy management and optimization, as well as support the integration of renewable energy sources. More recently, there has been an increasing focus on blockchain and big data in the energy sector. Several studies have investigated the potential benefits and challenges of these technologies and their combined applications in areas such as energy trading [37], smart energy management [38], and smart cities [39]. These studies have shown that the combination of blockchain and big data can enable a more efficient, secure, and decentralized energy system, as well as support the integration of renewable energy sources and the creation of new business models. Not least notable is the fact that blockchain technology can help ensure the integrity and subsequent audibility of big data, which is essential for both the performance of AI-driven data analysis models and big data analytics systems.
In addition to the above, the industry sector is creating synergies to integrate blockchain technology and IoT in the energy sector to establish international standards by creating data as homogeneous as possible (especially with a view to information exchange and data reuse and analysis); among these, we can mention the Energy Web Foundation (https://www.energyweb.org/ (accessed on 30 September 2023)), the Enterprise Ethereum Alliance (https://entethalliance.org/ (accessed on 30 September 2023)), and the Trusted IoT Alliance (https://www.iiconsortium.org/ (accessed on 30 September 2023)). There are also new start-ups that, through the use of proprietary tokens (altcoins), propose alternative systems for the measurement and electricity exchange, using blockchain, such as Restart Energy [40] and the Australian Power Ledger [41]. Finally, Aitzhan et al. [42] analyze security and privacy issues in a decentralized energy trading system. Table 1 summarizes the topics covered in some of these key studies, while Table 2 illustrates the issues addressed.

3. Fundamentals

3.1. Blockchain

“Blockchain is a peer-to-peer, distributed ledger that is cryptographically secure, append-only, immutable (extremely hard to change), and updatable only via consensus or agreement among peers” [43]. The blockchain is a distributed ledger, where all peers in the network own a complete copy of the ledger. In the blockchain network, there is no central controller and all participants talk directly to each other. This feature allows transactions between peers without a third-party certification system. To make the ledger secure against tampering and misuse, complex cryptographic algorithms are implemented to ensure data integrity, non-repudiation, time stamping, and data ownership. As the word itself says, the blockchain consists of a chain of operations enclosed in blocks that are sequentially ordered. Therefore, the blockchain has the characteristic of being append-only and once a piece of information is placed inside it is virtually impossible to remove. A transaction can be entered into the blockchain only if the requirements imposed by the blockchain protocol are met. This protocol is defined by the nodes that make up the network, through a well-defined algorithm called consensus. Once the consensus algorithm is defined, no changes can be made without the prior agreement of all or at least most of the nodes. This feature ensures trust among the nodes without a third-party validator (Figure 1).
There are three types of blockchain: permissionless (public), permissioned (private), and hybrid (consortium). A public blockchain is an open platform similar to a shared database. Anyone can sign up and use it. Everyone can read and write without censorship. To date, based on market capitalization, the top two public blockchains are Bitcoin [44] and Ethereum (https://coinmarketcap.com/ (accessed on 30 September 2023)). In contrast, private blockchains are more restrictive. Access must be granted by those operating the network, and limits can be imposed on reading and writing data. Private blockchains are therefore designed to restrict access to approved actors, e.g., partners, customers, suppliers, regulators, etc. Permissioned blockchains generally have greater application in the industry, as they provide greater privacy and commercial confidentiality than a public blockchain. One example of a private, permissioned blockchain is Hyperledger (https://www.hyperledger.org/ (accessed on 30 September 2023)). It is an open-source project, created in 2016 by thirty big tech companies, to advance blockchain use in different sectors. Finally, a consortium blockchain is a hybrid of public and private blockchains, where a group or a single entity manages the network. Nodes in the network can have different types of privileges, such as controlling the consensus protocol or managing transactions. Hybrid blockchains are often attractive to entities in the same industry because companies can leverage blockchain to improve workflow efficiency, share accountability over information and resources, and promote transparency. Consumers, by accessing the public side of the blockchain, can obtain information about consortium products and perform transactions. One example is the R3 open-source blockchain platform Corda (https://www.r3.com/about/ (accessed on 30 September 2023)).

Advantages of Blockchain versus a Database

The main advantages of using blockchain technology over other technologies such as SQL or NoSQL databases or cloud-based solutions are security, immutability, transparency, decentralization, and efficiency. Blockchain technology offers a higher level of security than traditional databases because the data are encrypted and distributed across multiple nodes. In addition, the data stored on the blockchain are immutable, which means they cannot be changed or deleted. Transparency is another advantage of blockchain technology, as all data are visible to all participants in the network. In addition, blockchain technology is decentralized, which means it does not depend on a single central entity. Finally, blockchain eliminates and reduces the need for intermediaries, paperwork, human error, and bureaucratic delays through the use of smart contracts that define the rules and conditions of transactions.

3.2. Smart Contract

In 2013, Vitalik Buterin created a new cryptocurrency platform called Ethereum to build a new system that was faster, more scalable, and more efficient than Bitcoin. Above all, Ethereum aimed to introduce the notion of smart contracts [45], devised by Nick Szabo [14] in 1993. A smart contract is software designed to automatically coordinate and enforce the execution of contract terms. A smart contract eliminates intermediaries in contracts between multiple parties and reduces the risks of errors, fraud, and subjective interpretations, to reduce costs and uncertainty. Blockchain allows the execution of software in a completely decentralized and reliable way. Unlike traditional software, the terms of the smart contract, once created, become immutable, and the blockchain guarantees execution integrity. The advantages of blockchain-based smart contracts also include immutability, cost effectiveness, self-execution, accuracy, reliability, and auditability [46].

3.3. IoT

Internet of Things (IoT) devices are small computers that collect data through various wired sensors and communicate with other devices, usually in wireless mode. Because they have low processing power and limited storage capacity, they are very inexpensive. We often find them used in electricity, water, and natural gas meters to make them smart. IoT smart meters can be connected to the distribution network and provide near-real-time data to enable system users to monitor the distribution network efficiently [47].

3.4. Main Actors in the Energy System

The main actors in the energy system, from the end-user point of view, can be summarized as follows (Figure 2):
  • Distributor: the electricity distribution company is responsible for the network of power lines, underground cables, substations, and so on, that bring electricity to a user’s home. It also owns the meters and takes readings of energy usage.
  • User: the person who produces or consumes energy and uses the energy distributor’s services;
  • Energy meter: a device used to measure both electricity production and consumption;
  • Public Authority (PA): the government institution that oversees the national power grid and accesses power system data such as the current load of the electricity grid in a neighborhood, district, or city.

4. Materials and Methods

In this methodology section, we discuss the study approach, including the solution design. In the first stage, we study the literature documentation that is the background for our prototype. The papers are listed in the related work Section 2. Based on these studies, we find considerable interest in blockchain technology applied to the energy field. In parallel, more and more studies are pointing to the blockchain as a very promising solution for the creation and tracking of consistent and reliable big data on which to train artificial intelligence models and machine learning algorithms that can be controlled, circumvented, distorted, and misled by erroneous input data. Therefore, we decided to design an integrated system to measure electricity production that could benefit from the potential of Blockchain technology and IoT by applying it to the creation of big data that can also be exploited by artificial intelligence. After the study phase, we turn to the design phase, where we define the overall prototype structure by analyzing possible alternatives and identifying the main components. The design overview Section 4.1 provides an outline of the main system components. Then, we implement the solution using the hardware and software described in Section 4.1 and Section 4.2, including the technologies needed to achieve the purpose. To reach the result proposed in this paper, some changes to the initial design are necessary, and through subsequent refinements, we finally achieve a working prototype. The remaining subsections describe in detail how the prototype is constructed, and the steps needed to replicate it. First, the installation and configuration of the blockchain are described, followed by the software used including the smart contract source code and the decentralized application flowchart. The Python programming language is chosen because it is one of the most widely used languages in the scientific community, and many libraries are available to simplify data interpretation and management tasks.

4.1. System Overview

As illustrated in Figure 3, the implemented test bed system model consists of the following components:
  • An energy smart meter;
  • A blockchain.
  • An IoT device;
  • A python application;
  • A smart contract.
The smart sensor is a power meter that is used to measure the current produced in a specific timeframe; for our test bed, one hour is decided. There are many types of them on the market from different brands, such as Shelly (https://www.shelly.com/en/products/professional-series (accessed on 30 September 2023)), Meross (https://www.meross.com/en-gc/product (accessed on 30 September 2023)), Smart-Maic (https://smart-maic.com/en/ (accessed on 30 September 2023)), etc. The private blockchain is installed on a laboratory laptop (I7 processor and 16Gb RAM) with a Windows operating system. The system core is the IoT device, a Raspberry Pi3 B+ (https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/ (accessed on 30 September 2023)) on which the main application, developed in Python, is installed. The Raspberry is connected via Wi-Fi with both the energy meter and the laptop on which the blockchain is installed. The application has the major tasks of (A) detecting and calculating the hourly production from the sensor (exploiting the manufacturer API), (B) creating an array of useful information to track the electricity produced such as timestamp, System ID, Producer Wallet, produced kWh, Type of System (energy source), and geographical area or address, (C) connecting to the blockchain, (D) executing the smart contract writing function to historize the data on the blockchain. Section 4.2.4 illustrates the application details and flowchart.

4.2. Software Technologies

The following software technologies were used to implement the project:
  • Python 3.8 coding language to develop the main application;
  • The Application Programming Interface (API) for reading data from smart meters;
  • The web3.py 6.11 python library for reading block data, signing and sending transactions, and interacting with smart contracts;
  • The Ganache 2.7.1 software product to create a private [48] blockchain based on the Ethereum [17] ecosystem and manage the smart contract [45];
  • The object-oriented, high-level Solidity [49] programming language for writing the smart contract.

4.2.1. Python Development Environment

Raspberry comes with Python 3 already installed. We used the cross-platform package manager (PIP—Pip Installs Packages) for installing and managing the web3 and smart meter API library.

4.2.2. Ganache Installation and Configuration

Ganache is a private blockchain environment that allows emulation of the Ethereum blockchain so that interaction can be carried out with smart contracts in s private blockchain. Ganache provides the following features: easy view the log of each operation, advanced mining control, and integrated block explorer. Ganache has a desktop application and a command-line tool, too. The private blockchain is installed on a test laptop using a pre-built package for the Windows operating system. After installing the software, we configure the local private Blockchain by clicking the “Quick-Start” button in the Ganache user interface. This initializes a new blockchain with ten pre-configured accounts loaded with 100 Ether tests each. In addition, via the “setting” button, we make simple custom adjustments according to our network and performance needs.

4.2.3. Smart Contract Development

The smart contract was developed using the Remix 1.3.6 software, available on the Ethereum website. Remix is an Integrated Development Environment (IDE) with which it is possible to carry out all the operations necessary for the creation of a smart contract; in fact, it is possible to write the source code, compile it, debug it, and deploy it directly on the Ethereum blockchain. The smart contract was coded using the Solidity programming language, developed specifically for the Ethereum Virtual Machine (EVM). The smart contract source code has been tested both on the local blockchain made with Ganache and on the official Ethereum Goeli testnet and is available at: https://goerli.etherscan.io/address/0x266F784AB6a41C15f81796B07C0939c628bbdBad#code (accessed on 30 September 2023). When the smart contract is instantiated, it receives, as input, information concerning the electricity production of the timeframe under consideration (one hour in the prototype), the producer ID, and the energy source, in addition to the timestamp and the wallet making the transaction (Figure 4).
The smart contract has four main functions, summarized below:
  • addUser: authorize a user (wallet) to write energy production data to the blockchain;
  • removeUser: remove a previously authorized user;
  • verifyUser: verify whether a user is authorized to write hourly energy production data to the blockchain;
  • addProduction: write an array to the blockchain containing information on energy produced in the last hour (only for addresses in the whitelist).
Referring to the main actors of the energy system in Figure 2, the first three functions are used by the owner of the blockchain (the distributor or public authority) to authorize users to write data on the blockchain. The addProduction() function, on the other hand, is used by the producer (end-user) to record their data.

4.2.4. Decentralized Application Development

In our context, a DApp (Decentralized Application) is a console application that interacts with the blockchain. Compared to a traditional application, a DApp [15] has better performance (low latency, high throughput), reasonably low transaction costs, and flexible maintainability. In addition, a DApp does not store user data locally but exclusively relies, or nearly so, on the blockchain to which it connects. The Python programming language was used for this prototype, which saves a lot of time in programming; it is also particularly suitable for application development on IoT devices due to its low resource consumption and the wide availability of additional modules and libraries, which can meet the needs of programmers in various application fields. We also used the Web3.py libraries to read and write data to the blockchain by connecting to the smart contract and using the provided functions. The main application steps are summarized in the flowchart in Figure 5 and briefly described as follows.
After importing the necessary modules (the APIs for connecting to the energy sensor and the web3.py libraries for connecting to the blockchain), the application checks that the smart meter is connected to the network, and, if so, reads the information about the hourly energy production; otherwise, it waits three seconds and tries a new connection. The same procedure is performed when connecting to the blockchain; if it is not available, the connection is retried after a three-second time delta. After both operations are successful, the application accesses the private keys of the local wallet to create an instance of connection to the smart contract, signing the requests with the private key. If the wallet is authorized, the application invokes the smart contract addProduction() function to historize the information on the blockchain. Finally, the connection to the blockchain is closed, and the next hourly execution is awaited. Figure 6 shows an example of the information saved on the blockchain. The data represent the first transaction made on the local private blockchain Ganache.
The transaction shows (0) an incremental ID that is used internally by the smart contract to number the data entered through the addProduction() function, (1) the wallet address that performed the transaction, (2) the producer name, which could be a meaningful identification code for the distributor or public authority, (3) the energy source type (1 corresponds to the energy produced by solar panels, 2 to wind power, and so on, as shown in https://goerli.etherscan.io/address/0x266F784AB6a41C15f81796B07C0939c628bbdBad#code (smart contract source code) (accessed on 30 September 2023)), (4) the value of the energy produced in milliwatts, and (5) the timestamp of when the hourly reading was taken. Of primary interest is the wallet address that made the transaction on the blockchain, as it guarantees and incontrovertibly binds the wallet owner to the input data.

5. Results

This section presents details on how to implement this test environment. The testbed consists of the following hardware: a smart current meter; a Raspberry PI3b+ IoT device with a Raspbian operating system; a laptop with I7 processors, 8 GB memory, 500 GB hard disk, and Windows 10 operating system. The power meter and Raspberry simulate a smart meter, while the private blockchain is installed on the laptop. The following software is used: the Python 3.8 development environment; the Solidity programming language; and Ganache software to build the private Blockchain and Web3 libraries. After installing the software required for the testbed, as mentioned in Section 4, we proceed to deploy the smart contract on the private blockchain using the Remix 1.3.6 IDE software, a graphical user interface for developing smart contracts available at https://remix.ethereum.org/ (accessed on 30 September 2023). The smart contract source code is available at https://goerli.etherscan.io/address/0x266F784AB6a41C15f81796B07C0939c628bbdBad#code (address) (accessed on 30 September 2023). Following the smart contract upload and proper compilation (Figure 7), it was successfully deployed on the private Ganache blockchain (Figure 8).
A test data entry was then performed to verify the correct smart contract functionality. The data shown in Figure 9 were entered, and then the transact button was pressed to store the information on the blockchain and receive the transaction ID.
In Figure 10, successful transaction execution can be seen, while in Figure 11, through the Ganache GUI, the new block and the transaction just entered on the blockchain can be observed.
Finally, to test the full system functionality, the Python application was installed on the IoT device. After startup, the application read the hourly energy production by connecting to the sensor, enriched it with the metadata outlined in the Section 6, and wrote the data to the Blockchain. The Python application log related to the just-entered transaction is available in Figure 12. The application flowchart is depicted in Figure 5, while the whole system sequence diagram is illustrated in Figure 13.
As described in this section, the electricity production tracking system was successfully tested. Figure 3 illustrates the system model architecture, while Figure 6 depicts the result obtained, which is writing the electricity production data on the blockchain. Using the proposed system, a user’s electricity production data can be stored on the blockchain, guaranteeing transparency, timestamping, and information authenticity with a very high security level [50]. By applying our prototype on a large scale, it is possible to obtain a huge amount of reliable, certified, and tamper-proof data on which to perform traceable analysis and forecasting. In addition, in this section, we investigate (A) the general system performance and where the bottleneck is, (B) the private blockchain performance and the transactions per second it can handle, (C) and finally we analyze the disk space taken up by a single transaction.

5.1. System Performance

Before analyzing the general system performance and identifying any bottlenecks, it is necessary to examine its three main functions, depicted in Figure 13:
  • Connection request to the smart energy sensor (Step 1);
  • Energy production request (Step 2);
  • Production data writing on the blockchain (Step 3).
Since the energy meter and the IoT device on which the DApp resides are connected to the same local network, the network latency time and the meter response time are negligible in the overall system performance calculation. Furthermore, since the request is hourly, any delay in the response from the sensor does not impact the general performance (Steps 1 and 2). In the event of a response timeout, the application sends a new request. A different discussion is needed for Step 3, as the blockchain is external to the user’s private network. There could be slowdowns and latencies due to either the network connection or the blockchain response time. However, possible network latencies can be neglected, as data could pass directly over the distributor’s energy network and reach the blockchain. Thus, we can say that the system’s performance depends mainly on the blockchain’s response time and its speed in processing data, as it must potentially serve many thousands of users per hour. The blockchain is the system’s bottleneck. To overcome this limitation, any delay in writing the data to the blockchain does not affect the information quality, since the hourly energy production timestamp is specified in the transmitted data bundle. The prototype performance simulation returned the following maximum values, summarized in Table 3. Retrieving hourly production data took up to 2.3 s; writing to blockchain took up to 5.2 s.

5.2. Blockchain Performance

Performance analysis is a key requirement in deciding which blockchain to use and how to optimally configure it to achieve the computational capabilities required by the application domain. For example, it is relevant to consider characteristics such as transaction speed, system scalability, the number of minimum and maximum nodes the system can accept, the storage costs, and last but not least, the nodes’ energy efficiency. With this in mind, many blockchains have emerged that have excellent performance, each with strengths and weaknesses that make comparison difficult unless a well-defined industrial application context is established. By analyzing performance in terms of the maximum number of transactions per second that the blockchain system can handle, private ones perform significantly better than public ones, as they can process hundreds or even thousands of transactions per second [51]. In this section, we do not analyze which are the best blockchains for our application, but we plan to calculate the boundaries of the implemented prototype and the maximum achievable performance by analyzing the data available in the literature. We aim to make the system as compatible as possible with other blockchains as well; the prototype is usable with any other blockchain that is compatible with the Ethereum Virtual Machine (to date, there are more than 50 blockchains) [52]. In future work, we will conduct performance tests on an embedded system that can integrate the whole prototype into one product or, at least, match the smart meter inside the IoT device and integrate both into a next-generation smart meter. Based on the general system design, Figure 3, and system performance, Section 5.1, we can see that the proposed system bottleneck is the blockchain’s computational capacity, expressed as the number of transactions per second (TPS) it can perform. During a period between t 0 and t 1 , transactions per second of i-Node can be calculated with the following equation, where Txs stands for transactions:
Node i = Count [ Txs in ( t 1 t 0 ) ] ( t 1 t 0 ) ( Txs / s ) .
This limitation constrains us in choosing the best time delta to track the energy produced and the number of users that can be served with a single private blockchain. Therefore, we try to analyze, for each hour, the number of users it is possible to handle with our prototype. In an early analysis of private blockchain platforms’ performance [53], the authors report that the best result is obtained when the system receives a maximum of one hundred transactions per second. Comparable results were found in [54]. A critical element affecting the performance of a private blockchain is the node configuration parameters. An optimization of these parameters can significantly improve the overall performance of the system. In [55], the authors found a maximum of 284 TPS, which is almost three times higher than the previously mentioned studies. In [56], the authors even reached 328 transactions per second. Applying these results to our case study, assuming a uniform distribution of requests arriving at the private blockchain, we can estimate a maximum hourly (3600 s) throughput of up to
Throughput max = 328 3600 = 1 , 180 , 800 Txs / h .
Ethereum is constantly evolving and set to undergo a series of upgrades soon. These upgrades aim to transform the ecosystem into a fully scalable and resilient platform, with the transaction management system being upgraded to a theoretical maximum of 100,000 TPS. These upgrades are outlined in Ethereum’s roadmap: https://ethereum.org/it/roadmap/(accessed on 30 September 2023).

5.3. Storage Analysis

To calculate the storage size needed to archive data within a blockchain, it is necessary to know the blockchain type, contract, and complexity of the used function. If, for the Bitcoin blockchain, the storage occupied on disk by a transaction is fairly easy to calculate and corresponds to about 250 bytes (usually), to calculate the same value on the Ethereum blockchain, some additional steps and information are needed. In fact, on the Ethereum blockchain, the disk space occupied also depends on the complexity of the smart contract function interacted with. Each function invoked by a transaction has a cost in gas, which is a measure of the amount of computational resources required to execute it. Gas is paid in Ether, the Ethereum currency, and its price varies according to market supply and demand. To write to the blockchain, the prototype invokes the AddProduction function, which saves an array containing information about the energy produced. To insert an array like the one in Figure 6 into the blockchain, 164,880 gas units were used. In addition to the transaction cost, it is necessary, referring to the values given on the Ethereum Yellow Paper [17], to know the Ethereum Virtual Machine (EVM) fee schedule shown in Table 4.
Applying formula (https://ethereum.stackexchange.com/questions/71634/how-to-measure-size-of-stored-data-in-the-blockchain (accessed on 15 July 2023))
Bytes = ( Gas Used G transaction ) / G txdatanonzero
we obtain the following result:
( 164 , 880 21 , 000 ) / 68 2116 bytes .
Value (4) represents the amount of disk space required to save the data in Figure 6 on the private blockchain.

6. Discussion

The proposed architecture achieves improvements over the traditional energy meter, which lacks transparency, has significant management costs, and is easily attacked by malicious parties [12]. The system consists of a smart meter built by connecting an IoT device and an energy meter, a private blockchain, a smart contract, and a decentralized application. Blockchain technology is considered one of the most secure methods of storing data in a decentralized manner compared to the centralized method. Therefore, this solution has the advantage of (A) protecting a user’s data that, once stored on the blockchain, is safe even if a node on the network is attacked, as the single point of failure is eliminated; (B) locking any malpractices made by a malicious user as the Raspberry-Pi can be configured to detect any physical intrusions and block unauthorized SSH connections; (C) making the system free of inconsistencies and difficult to attack as the blockchain follows the consensus protocol before entering a new transaction. The system also contributes to the generation of big data that is reliable, traceable, foolproof, and highly resistant to cyber attacks. Through successful testing and observation of results, it has been determined that the prototype is effective in tracking energy production in a new way. This is achieved through the use of an IoT device and blockchain technology. Below, we discuss the features of the prototype and its strengths and weaknesses.
Low power consumption: the whole prototype has a low power consumption, as the Raspberry Pi 3 Model B+ consumes about 400 mA of current at 5.0 V (about 1.9 Watts) when no USB devices are connected, and it is in an idle state. At full power, on the other hand, consumption is about 5 Watts https://www.pidramble.com/wiki/benchmarks/power-consumption (accessed on 30 September 2023)). Tests carried out when the decentralized application is running (about 10 s every hour) show utilization of about 30% of the total system power. The energy consumed by the energy smart meter depends on the product used, but it is generally so low that it can be neglected. Instead, the blockchain energy consumption should be highlighted. The latest changes to the consensus protocol of the Ethereum blockchain from the old PoW (Proof of Work) to the new PoS (Proof of Stake) have optimized energy consumption with a saving of around 99.9% compared to the previous energy use [57].
Low cost: the products used in the prototype (IoT device and energy sensor) are available on the market and widely used. The hardware consists of low-cost, low-performance components. This makes the prototype very cheap (under USD 50). The cost of managing a blockchain server depends on the number of users it serves, making any cost estimate impossible. There are no software-related costs as the operating system can be completely open source like the Ethereum blockchain.
Privacy: A private blockchain restricts access to the network only and exclusively to actors authorized with specific read or write permissions. The proposed system improves user privacy as there are no identifying data, but only numeric codes such as the plant ID and the address of the wallet that performed the writing operation on the blockchain. This information cannot be directly linked to the owner of the production plant but is only known by those who hold the sales contract or by the distributor.
System integration: Current home energy meters have little or no technology inside them; the prototype proposed here, given its low space consumption and very low cost, if manufactured at the industrial level, can be easily integrated into a single next-generation smart metering system. It will be the subject of future development.
Open source: the technology used in the proposed system is completely open source and actively developed by well-organized and structured communities of developers. Therefore, there are no annual subscriptions to pay nor the need to purchase expensive proprietary software or subscription fees.
Big Data: Incorrect or poor-quality data can have negative impacts on company operations and profitability. Poor-quality data is often considered the source of operational problems, inaccurate analysis, and ill-conceived or ineffective business strategies. Today, data are strategic for companies, as many processes are based on it. The proposed system, leveraging blockchain technology, facilitates the creation of secure big data with little or no chance of error, traceable, up-to-date, and difficult to access by unauthorized third parties, as well as highly resistant to cyber attacks. Approximately 950,000 electricity production plants from renewable energy sources in Italy were surveyed in 2020 [58] while, according to the National Renewable Energy Laboratory, there were approximately 2.7 million residential solar installations in the USA [59] during the same period. Using our prototype to track electricity production from renewable sources in these or similar scenarios, and scaling the system and blockchain accordingly, we could generate reliable and secure traceable big data.
Security: the proposed system pays serious attention to both data security and user privacy protection to avoid potential threats that could compromise authenticity, timestamping, and data ownership. The blockchain is a secure technology by design due to the use of complex cryptographic algorithms and digital signatures to authenticate transactions. The decentralized characteristic of blockchain makes it more resilient to cyber attacks, as the computation and storage of data are distributed across multiple devices and not on a single centralized server. The security and confidentiality provided by the blockchain ensures that data are safe and tamper-proof. In the case of private or permissioned blockchains, the robustness of the ledger depends largely on permission control systems. The proposed system does not require an Internet connection, so it can easily be used in a private network that provides greater security from external cyber attacks. In addition, all communication within the system is encrypted with the SSL/TLS protocol [60], which makes it difficult for a malicious user to tamper with communication data.
Data leakage: Although blockchain technology is a secure system based on complex cryptographic algorithms, the data contained within a transaction can be subject to data leakage. Authorized people with access to private blockchain content can accidentally or maliciously leak data to unauthorized third parties. An access system based on two-factor authentication could be adopted to strengthen system security from unauthorized access and data breaches. In [26], a multifactor, multi-level adaptive authentication framework was developed that incorporates access control and intrusion detection mechanisms with automatic authentication method selection. In addition, appropriate data encryption technology systems are needed to further protect the data. In recent papers, [27,61] proposed new cryptographic algorithms that are performant, robust, and resistant to common cyber attacks.
Data storage: Unlike centralized servers, decentralized storage systems are composed of a peer-to-peer network that shares information. According to the official Ethereum blockchain website (https://ethereum.org/en/developers/docs/storage/ (accessed on 15 July 2023)), the public mainnet currently occupies about 1 TB (https://etherscan.io/chartsync/chaindefault (accessed on 15 July 2023)) and is composed of just over 7000 nodes https://etherscan.io/nodetracker (accessed on 15 July 2023). The theoretical limit of blockchain expansion is estimated at 5 terabytes. Beyond that limit, it is expected that it would not be possible for all nodes to continue to function properly. In addition, the distribution cost of so much data on the main network would be prohibitive due to the essential gas charges for the Ethereum network to operate under the PoS (Proof of Stake) consensus protocol. Based on these data, calculating there are approximately 2129 million transactions in the blockchain to date https://etherscan.io/ (accessed on 15 July 2023), we can estimate that the blockchain has acceptable performance up to approximately 10,000 million transactions. It is important to note that these estimates refer to Ethereum’s public network, while there is no official data on the private network’s capabilities. In a private network, there are generally a few dozen nodes, and the consensus protocol is completely different; it is based on PoA https://academy.binance.com/en/articles/proof-of-authority-explained (accessed on 15 July 2023) (Proof of Authority) which does not require the use of gas to operate. Therefore, the above limitations could be greatly underestimated for a private Ethereum network. If private network operators have needs beyond the highlighted limitations, two or more blockchains can be set up to share the workload, or a different blockchain specifically designed to handle big data could be used like Filecoin https://filecoin.io/ (accessed on 15 July 2023)), HoloChain https://www.holochain.org/ (accessed on 15 July 2023), or Ocean Protocol https://oceanprotocol.com/ (accessed on 15 July 2023) as examples. Such blockchains are all EVM (Ethereum Virtual Machine) compatible, so they do not require any smart contract changes to operate properly. Our prototype would run smoothly on the new blockchain as the test environment blockchain. Beyond these solutions, older data pruning [62,63] techniques, or overlapping algorithms [64] could be used to decrease the occupied space. Knowing the real-world scenario in which the proposed system will be applied is crucial for choosing the optimal solution.
Limitations: System performance is affected by the blockchain configuration parameters; such optimizations impact the number of users the system can serve and the disk space occupied per transaction. In addition, user privacy could be improved by encrypting the information written to the ledger with appropriate rules. The prototype was tested with only one node in the network since, unfortunately, Ganache does not allow the creation of multiple nodes in the same private Ethereum network; to overcome this problem, other software such as Geth 1.13 https://geth.ethereum.org/ (accessed on 30 September 2023) or OpenEthereum https://openethereum.github.io/ (accessed on 30 September 2023) must be used. These points will be explored in future work. Finally, all software developed should be engineered for industrial use and audited, particularly the smart contract [65].

7. Conclusions and Future Work

This article presents a method for tracking electricity production that ensures reliable, secure, transparent, tamper-proof, and date-stamped data. Having accurate and traceable data is crucial for producing high-quality big data, which is essential for performing analysis and training artificial intelligence models. To achieve this, a prototype was created using a Raspberry Pi IoT device, which was connected to an energy sensor to detect the hourly output of users. The data were collected and stored on a private Ethereum blockchain using a decentralized Python application that interacts with a Solidity smart contract. We modeled and simulated energy production case scenarios. We performed the system performance analysis by identifying the bottleneck and space requirements for each transaction saved on the blockchain. Furthermore, we forward-evaluated the blockchain’s performance in terms of transactions per second. The system is also compatible with more than 50 other EVM-compatible blockchains [52]. Finally, we also evaluated the system’s security and its limits. The findings indicate the project’s viability, as they showcase its cost effectiveness, energy efficiency, robust security measures, reliable performance, and commitment to maintaining user privacy. Moreover, the system’s transparent nature enables producers and authorized users to access and track electricity production, fostering stakeholder trust and confidence.
Future work: our plans involve the creation of a prototype smart energy meter that integrates with a sensor and is compatible with current energy meters. This product will be remotely programmable for added convenience. As the blockchain world continues to evolve rapidly, new registers that are increasingly high-performance and suitable for commercial use are emerging. To ensure optimal performance and user satisfaction, we will evaluate the available blockchains on the market in terms of performance, occupied disk space, and number of users served.

Author Contributions

M.G.: methodology, software, formal analysis, writing—original draft preparation; F.F.: writing—review and editing, funding acquisition; F.O.: conceptualization, writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. IEA. Renewable Electricity Growth Is Accelerating Faster than ever Worldwide, Supporting the Emergence of the New Global Energy Economy. News, 1 December 2021; p. 1. [Google Scholar]
  2. Sioshansi, F.P. Smart Grid: Integrating Renewable, Distributed and Efficient Energy; Academic Press: Cambridge, MA, USA, 2011. [Google Scholar]
  3. Rusitschka, S.; Curry, E. Big Data in the Energy and Transport Sectors. In New Horizons for a Data-Driven Economy: A Roadmap for Usage and Exploitation of Big Data in Europe; Springer International Publishing: Cham, Switzerland, 2016; pp. 225–244. [Google Scholar] [CrossRef]
  4. Brilliantova, V.; Thurner, T.W. Blockchain and the future of energy. Technol. Soc. 2019, 57, 38–45. [Google Scholar] [CrossRef]
  5. Malik, H.; Anees, T.; Faheem, M.; Chaudhry, M.U.; Ali, A.; Asghar, M.N. Blockchain and Internet of Things in smart cities and drug supply management: Open issues, opportunities, and future directions. Internet Things 2023, 23, 100860. [Google Scholar] [CrossRef]
  6. Faheem, M.; Butt, R.A. Big datasets of optical-wireless cyber-physical systems for optimizing manufacturing services in the internet of things-enabled industry 4.0. Data Brief 2022, 42, 108026. [Google Scholar] [CrossRef]
  7. Koseleva, N.; Ropaite, G. Big data in building energy efficiency: Understanding of big data and main challenges. Procedia Eng. 2017, 172, 544–549. [Google Scholar] [CrossRef]
  8. Zhou, K.; Fu, C.; Yang, S. Big data driven smart energy management: From big data to big insights. Renew. Sustain. Energy Rev. 2016, 56, 215–225. [Google Scholar] [CrossRef]
  9. Pop, C.; Antal, M.; Cioara, T.; Anghel, I.; Sera, D.; Salomie, I.; Raveduto, G.; Ziu, D.; Croce, V.; Bertoncini, M. Blockchain-based scalable and tamper-evident solution for registering energy data. Sensors 2019, 19, 3033. [Google Scholar] [CrossRef] [PubMed]
  10. Wongthongtham, P.; Marrable, D.; Abu-Salih, B.; Liu, X.; Morrison, G. Blockchain-enabled Peer-to-Peer energy trading. Comput. Electr. Eng. 2021, 94, 107299. [Google Scholar] [CrossRef]
  11. Guo, Y.; Wan, Z.; Cheng, X. When blockchain meets smart grids: A comprehensive survey. High-Confid. Comput. 2022, 2, 100059. [Google Scholar] [CrossRef]
  12. Garcia, F.D.; Marafão, F.P.; de Souza, W.A.; Pereira da Silva, L.C. Power Metering: History and Future Trends. In Proceedings of the 2017 Ninth Annual IEEE Green Technologies Conference (GreenTech), Virtual, 29–31 March 2017; pp. 26–33. [Google Scholar] [CrossRef]
  13. Soori, M.; Arezoo, B.; Dastres, R. Internet of things for smart factories in industry 4.0, a review. Internet Things-Cyber-Phys. Syst. 2023, 3, 192–204. [Google Scholar] [CrossRef]
  14. Szabo, N. Smart Contracts. 1994. Available online: https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart.contracts.html (accessed on 30 September 2023).
  15. Cai, W.; Wang, Z.; Ernst, J.B.; Hong, Z.; Feng, C.; Leung, V.C.M. Decentralized Applications: The Blockchain-Empowered Software System. IEEE Access 2018, 6, 53019–53033. [Google Scholar] [CrossRef]
  16. Orecchini, F.; Santiangeli, A.; Zuccari, F.; Dell’Era, A. The Concept of Energy Traceability: Application to EV Electricity Charging by Res. Energy Procedia 2015, 82, 637–644. [Google Scholar] [CrossRef]
  17. Wood, G. Ethereum: A Secure Decentralised Generalised Transaction Ledger. 2014. Available online: https://gavwood.com/paper.pdf (accessed on 30 September 2023).
  18. Laurent, A.; Brotcorne, L.; Fortz, B. Transaction fees optimization in the Ethereum blockchain. Blockchain Res. Appl. 2022, 3, 100074. [Google Scholar] [CrossRef]
  19. Monrat, A.A.; Schelén, O.; Andersson, K. Performance Evaluation of Permissioned Blockchain Platforms. In Proceedings of the 2020 IEEE Asia-Pacific Conference on Computer Science and Data Engineering (CSDE), Gold Coast, QLD, Australia, 16–18 December 2020; pp. 1–8. [Google Scholar] [CrossRef]
  20. Gec, S.; Lavbič, D.; Stankovski, V.; Kochovski, P. Towards a smarter IoT environment with Ethereum Virtual Machine enabling ledgers. In Proceedings of the 2022 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA, 14–16 December 2022; IEEE: New York, NY, USA, 2022; pp. 1229–1232. [Google Scholar]
  21. Juszczyk, O.; Shahzad, K. Blockchain Technology for Renewable Energy: Principles, Applications and Prospects. Energies 2022, 15, 4603. [Google Scholar] [CrossRef]
  22. Bhatia, S. A Look at the Need for Traceability in the Energy Sector to Achieve Net Zero. 2023. Available online: https://www.linkedin.com/pulse/look-need-traceability-energy-sector-achieve-net-zero-sanket-bhatia/ (accessed on 30 September 2023).
  23. Rawat, D.B. Secure and trustworthy machine learning/artificial intelligence for multi-domain operations. In Proceedings of the Artificial Intelligence and Machine Learning for Multi-Domain Operations Applications III, Virtual, 12 April 2021; SPIE: Bellingham, WA, USA; Volume 11746, pp. 44–54. [Google Scholar]
  24. Chen, H.; Wang, T.; Chen, T.; Deng, W. Hyperspectral Image Classification Based on Fusing S3-PCA, 2D-SSA and Random Patch Network. Remote Sens. 2023, 15, 3402. [Google Scholar] [CrossRef]
  25. Bharadiya, J.P. A Comparative Study of Business Intelligence and Artificial Intelligence with Big Data Analytics. Am. J. Artif. Intell. 2023, 7, 24. [Google Scholar]
  26. Mostafa, A.M.; Ezz, M.; Elbashir, M.K.; Alruily, M.; Hamouda, E.; Alsarhani, M.; Said, W. Strengthening Cloud Security: An Innovative Multi-Factor Multi-Layer Authentication Framework for Cloud User Authentication. Appl. Sci. 2023, 13, 10871. [Google Scholar] [CrossRef]
  27. Kou, L.; Wu, J.; Zhang, F.; Ji, P.; Ke, W.; Wan, J.; Liu, H.; Li, Y.; Yuan, Q. Image Encryption for Offshore Wind Power Based on 2D-LCLM and Zhou Yi Eight Trigrams. Int. J. Bio-Inspired Comput. 2023, 22, 53–64. [Google Scholar] [CrossRef]
  28. Swan, M. Blockchain: Blueprint for a New Economy; O’Reilly Media: Sebastopol, CA, USA, 2015. [Google Scholar]
  29. Baig, M.J.A.; Iqbal, M.T.; Jamil, M.; Khan, J. Blockchain-Based Peer-to-Peer Energy Trading System Using Open-Source Angular Framework and Hypertext Transfer Protocol. Electronics 2023, 12, 287. [Google Scholar] [CrossRef]
  30. Baig, M.J.A.; Iqbal, M.T.; Jamil, M.; Khan, J. Peer-to-Peer Energy Trading in a Micro-grid Using Internet of Things and Blockchain. Electron. J. 2021, 25, 39–49. [Google Scholar]
  31. Falahi, M.; Vasilateanu, A.; Goga, N.; Suciu, G.; Sachian, M.A.; Florescu, R.; Stanciu, S.D. Improving Security and Scalability in Smart Grids Using Blockchain Technologies. In Proceedings of the 17th International Conference on Availability, Reliability and Security (ARES’ 22), Vienna, Austria, 23–26 August 2022; Association for Computing Machinery: New York, NY, USA, 2022. [Google Scholar] [CrossRef]
  32. Orecchini, F.; Santiangeli, A.; Zuccari, F.; Pieroni, A.; Suppa, T. Blockchain technology in smart city: A new opportunity for smart environment and smart mobility. In Proceedings of the Intelligent Computing & Optimization 1, Pattaya, Thailand, 4–5 October 2018; Springer: Berlin/Heidelberg, Germany, 2019; pp. 346–354. [Google Scholar]
  33. Mengelkamp, E.; Notheisen, B.; Beer, C.; Dauer, D.; Weinhardt, C. A blockchain-based smart grid: Towards sustainable local energy markets. Comput. Sci.-Res. Dev. 2018, 33, 1–8. [Google Scholar] [CrossRef]
  34. Diamantoulakis, P.D.; Kapinas, V.M.; Karagiannidis, G.K. Big Data Analytics for Dynamic Energy Management in Smart Grids. Big Data Res. 2015, 2, 94–101. [Google Scholar] [CrossRef]
  35. Khan, I.U.; Javaid, N.; Taylor, C.J.; Gamage, K.A.A.; Ma, X. Big Data Analytics Based Short Term Load Forecasting Model for Residential Buildings in Smart Grids. In Proceedings of the IEEE INFOCOM 2020—IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Toronto, ON, Canada, 6–9 July 2020; pp. 544–549. [Google Scholar] [CrossRef]
  36. Escobedo Briones, G.; Jacome, N.; Arroyo-Figueroa, G. Big Data & Analytics to Support the Renewable Energy Integration of Smart Grids—Case Study: Power Solar Generation. In Proceedings of the 2nd International Conference on Internet of Things, Big Data and Security (IoTBDS 2017), Porto, Portugal, 24–26 April 2017; pp. 267–275. [Google Scholar] [CrossRef]
  37. Hasan, M.K.; Alkhalifah, A.; Islam, S.; Babiker, N.B.M.; Habib, A.K.M.A.; Aman, A.H.M.; Hossain, M.A.; Kaluri, R. Blockchain Technology on Smart Grid, Energy Trading, and Big Data: Security Issues, Challenges, and Recommendations. Wirel. Commun. Mob. Comput. 2022, 2022, 9065768. [Google Scholar] [CrossRef]
  38. Li, J.; Herdem, M.S.; Nathwani, J.; Wen, J.Z. Methods and applications for Artificial Intelligence, Big Data, Internet of Things, and Blockchain in smart energy management. Energy AI 2023, 11, 100208. [Google Scholar] [CrossRef]
  39. Yu, H.; Yang, Z.; Sinnott, R.O. Decentralized Big Data Auditing for Smart City Environments Leveraging Blockchain Technology. IEEE Access 2019, 7, 6288–6296. [Google Scholar] [CrossRef]
  40. Restart Energy Democracy Platform SRL. Restart Energy Democracy Platform Website. 2023. Available online: https://redplatform.com/ (accessed on 30 September 2023).
  41. Power Ledger Pty Ltd. Power Ledger White Paper. 2019. Available online: https://assets.website-files.com/612e1d86b8aa434030a7da5c/612e1d86b8aa434027a7dd6d_power-ledger-whitepaper.pdf (accessed on 30 September 2023).
  42. Aitzhan, N.; Svetinovic, D. Security and Privacy in Decentralized Energy Trading Through Multi-Signatures, Blockchain and Anonymous Messaging Streams. IEEE Trans. Dependable Secur. Comput. 2016. [Google Scholar] [CrossRef]
  43. Bashir, I. Mastering Blockchain, 4th ed.; O’Reilly Media: Sebastopol, CA, USA, 2023. [Google Scholar]
  44. Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 30 September 2023).
  45. Buterin, V. Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform. 2013. Available online: https://ethereum.org/en/whitepaper/ (accessed on 30 September 2023).
  46. Gamage, H.T.M.; Weerasinghe, H.D.; Dias, N.G.J. A Survey on Blockchain Technology Concepts, Applications, and Issues. Comput. Sci. 2020, 1, 114. [Google Scholar] [CrossRef]
  47. Hua, L.; Zhang, J.; Fantao, L. Internet of Things Technology and its Applications in Smart Grid. Telkomnika Indones. J. Electr. Eng. 2014, 12, 940–946. [Google Scholar] [CrossRef]
  48. Buterin, V. On Public and Private Blockchains. 2015. Available online: https://blog.ethereum.org/2015/08/07/on-public-and-private-blockchains (accessed on 30 September 2023).
  49. Solorio, K.; Kanna, R.; Hoover, D.H. Hands-On Smart Contract Development with Solidity and Ethereum; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2019. [Google Scholar]
  50. Fallucchi, F.; Gerardi, M.; Petito, M.; Luca, E.W.D. Blockchain Framework in Digital Government for the Certification of Authenticity, Timestamping and Data Property. In Proceedings of the 54th Hawaii International Conference on System Sciences, HICSS 2021, Kauai, HI, USA, 5 January 2021; ScholarSpace: Honolulu, HI, USA, 2021; pp. 1–10. [Google Scholar]
  51. Sharma, T.K. Public vs. Private Blockchain: A Comprehensive Comparison. 2019. Available online: https://www.blockchain-council.org/blockchain/public-vs-private-blockchain-a-comprehensive-comparison/ (accessed on 30 September 2023).
  52. Dezentralizedfinance.com. Top 50 EVM Compatible Networks Map. 2023. Available online: https://dezentralizedfinance.com/top-50-evm-compatible-network/ (accessed on 30 September 2023).
  53. Pongnumkul, S.; Siripanpornchana, C.; Thajchayapong, S. Performance Analysis of Private Blockchain Platforms in Varying Workloads. In Proceedings of the 2017 26th International Conference on Computer Communication and Networks (ICCCN), Vancouver, BC, Canada, 31 July–3 August 2017; pp. 1–6. [Google Scholar] [CrossRef]
  54. Zheng, P.; Zheng, Z.; Luo, X.; Chen, X.; Liu, X. A Detailed and Real-Time Performance Monitoring Framework for Blockchain Systems. In Proceedings of the 2018 IEEE/ACM 40th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP), Gothenburg, Sweden, 25 May–3 June 2018; pp. 134–143. [Google Scholar]
  55. Dinh, T.T.A.; Wang, J.; Chen, G.; Liu, R.; Ooi, B.C.; Tan, K.L. BLOCKBENCH: A Framework for Analyzing Private Blockchains. In Proceedings of the SIGMOD’ 17: 2017 ACM International Conference on Management of Data, New York, NY, USA, 14–19 May 2017; pp. 1085–1100. [Google Scholar] [CrossRef]
  56. Schäffer, M.; di Angelo, M.; Salzer, G. Performance and Scalability of Private Ethereum Blockchains. In Business Process Management: Blockchain and Central and Eastern Europe Forum; Di Ciccio, C., Gabryelczyk, R., García-Bañuelos, L., Hernaus, T., Hull, R., Indihar Štemberger, M., Ko, A., Staples, M., Eds.; Springer International Publishing: Cham, Switzerland, 2019; pp. 103–118. [Google Scholar]
  57. Sarkar, A. The Merge Brings Down Ethereum’s Network Power Consumption by over 99.9. 2022. Available online: https://cointelegraph.com/news/the-merge-brings-down-ethereum-s-network-power-consumption-by-over-99-9 (accessed on 30 September 2023).
  58. GSE—Gestore dei Servizi Energetici, S.p.A. Rapporto Statistico 2020 Energia da Fonti Rinnovabili in Italia. 2022. Available online: https://www.gse.it/documenti_site/Documenti%20GSE/Rapporti%20statistici/Rapporto%20Statistico%20GSE%20-%20FER%202020.pdf (accessed on 12 June 2023).
  59. David Feldman, K.W.; Margolis, R. H1 2021 Solar Industry Update. 2021. Available online: https://www.nrel.gov/docs/fy21osti/80427.pdf (accessed on 30 September 2023).
  60. Internet Engineering Task Force (IETF). The Transport Layer Security (TLS) Protocol Version 1.3. 2018. Available online: https://datatracker.ietf.org/doc/html/rfc8446 (accessed on 30 September 2023).
  61. Al-Hazaimeh, O.M.; Al-Jamal, M.F.; Alomari, A.; Bawaneh, M.J.; Tahat, N. Image Encryption Using Anti-Synchronisation and Bogdanov Transformation Map. Int. J. Comput. Sci. Math. 2022, 15, 43–59. [Google Scholar] [CrossRef]
  62. Palm, E.; Schelén, O.; Bodin, U. Selective Blockchain Transaction Pruning and State Derivability. In Proceedings of the 2018 Crypto Valley Conference on Blockchain Technology (CVCBT), Zug, Switzerland, 20–22 June 2018; pp. 31–40. [Google Scholar] [CrossRef]
  63. Go-Ethereum. Pruning. 2023. Available online: https://geth.ethereum.org/docs/fundamentals/pruning (accessed on 30 September 2023).
  64. Islam, M.T.; Adnan, M.A. Reducing Storage Requirement in Blockchain Networks Using Overlapping Data Distribution. In Blockchain—ICBC 2020, Proceedings of the Third International Conference, Held as Part of the Services Conference Federation, SCF 2020, Honolulu, HI, USA, 18–20 September 2020; Springer: Berlin/Heidelberg, Germany, 2020; pp. 48–60. [Google Scholar]
  65. Cointelegraph.com. What Is a Smart Contract Security Audit? A Beginner’s Guide. 2023. Available online: https://cointelegraph.com/learn/what-is-a-smart-contract-security-audit-a-beginners-guide (accessed on 30 September 2023).
Figure 1. Blockchain working mechanism.
Figure 1. Blockchain working mechanism.
Electronics 12 04660 g001
Figure 2. Main actors in the energy system.
Figure 2. Main actors in the energy system.
Electronics 12 04660 g002
Figure 3. System model architecture.
Figure 3. System model architecture.
Electronics 12 04660 g003
Figure 4. Record containing data about energy production.
Figure 4. Record containing data about energy production.
Electronics 12 04660 g004
Figure 5. Application flowchart.
Figure 5. Application flowchart.
Electronics 12 04660 g005
Figure 6. Example of data saved on the Blockchain.
Figure 6. Example of data saved on the Blockchain.
Electronics 12 04660 g006
Figure 7. Smart contract compilation.
Figure 7. Smart contract compilation.
Electronics 12 04660 g007
Figure 8. Smart contract deploy.
Figure 8. Smart contract deploy.
Electronics 12 04660 g008
Figure 9. Smart contract data example.
Figure 9. Smart contract data example.
Electronics 12 04660 g009
Figure 10. Smart contract transaction example.
Figure 10. Smart contract transaction example.
Electronics 12 04660 g010
Figure 11. Transaction stored on Blockchain.
Figure 11. Transaction stored on Blockchain.
Electronics 12 04660 g011
Figure 12. Application log.
Figure 12. Application log.
Electronics 12 04660 g012
Figure 13. System sequence diagram.
Figure 13. System sequence diagram.
Electronics 12 04660 g013
Table 1. Overview of topics covered in some key studies.
Table 1. Overview of topics covered in some key studies.
TechnologyEnergy
Ref.BlockchainBig DataP2P TradingData Managem.Grid Opt.Tracking
[10]xxxx
[29,30]xxxx
[31]xxxx
[32]xxxx
[33]xxxx
[34,35,36]xxxxx
[37]xxx
[38]xxx
[39]xxx
[42]xxxx
Table 2. Overview of previous studies’ strengths.
Table 2. Overview of previous studies’ strengths.
Ref.Strengths of Previous Studies
[10]Increases blockchain scalability without compromising security and decentralization.
[29]Presents an advanced P2P energy trading system using blockchain, low-cost, low-power, open-source, and readily available components.
[30]Implements a low-cost P2P energy trading system.
[31]Provides a scalable and reliable blockchain-based security platform for Smart Grid.
[32]Integrates Blockchain technology into smart environment and smart mobility for tracking the sources and type of renewable energy.
[33]Implements a decentralized market platform for local energy exchange, with associated economic evaluation.
[34]Illustrates the issues and challenges related to big data in dynamic energy management used in smart grids. It also describes the data processing methods most commonly used in the literature.
[35]Develops a new architecture for electrical load forecasting that integrates data selection, extraction, and classification into a single model.
[36]Presents a technology infrastructure for managing large volumes of information through Big Data tools to support renewable energy integration.
[37]Presents a review of blockchain implementations for cybersecurity and energy data protection in smart grids.
[38]Reviews the methods and application of Artificial Intelligence, Big Data, Internet of Things, and Blockchain in smart energy management.
[39]Proposes a decentralized big data auditing scheme for smart cities, with lower communication and computational costs than existing schemes.
[42]Illustrates a decentralized energy trading system that uses blockchain, multiple signatures, and anonymous encrypted messaging streams for securely and anonymously trading energy prices.
Table 3. Communication delay—Max. Response Time.
Table 3. Communication delay—Max. Response Time.
DescriptionMax. Response Time (in Seconds)
Hourly Energy Production Request2.3
Successful Transaction on Blockchain5.2
Total Time7.5
Table 4. Ethereum fee schedule.
Table 4. Ethereum fee schedule.
NameValueDescription
Gtxcreate32,000Paid by all contract-creating transactions after the Homestead transition.
Gtxdatanonzero68Paid for every non-zero byte of data or code for a transaction.
Gtransaction21,000Paid for every transaction.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gerardi, M.; Fallucchi, F.; Orecchini, F. Blockchain Technology for Monitoring Energy Production for Reliable and Secure Big Data. Electronics 2023, 12, 4660. https://0-doi-org.brum.beds.ac.uk/10.3390/electronics12224660

AMA Style

Gerardi M, Fallucchi F, Orecchini F. Blockchain Technology for Monitoring Energy Production for Reliable and Secure Big Data. Electronics. 2023; 12(22):4660. https://0-doi-org.brum.beds.ac.uk/10.3390/electronics12224660

Chicago/Turabian Style

Gerardi, Marco, Francesca Fallucchi, and Fabio Orecchini. 2023. "Blockchain Technology for Monitoring Energy Production for Reliable and Secure Big Data" Electronics 12, no. 22: 4660. https://0-doi-org.brum.beds.ac.uk/10.3390/electronics12224660

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop