Agricultural Lightweight Embedded Blockchain System: A Case Study in Olive Oil

: In Tunisia, one of the major problems of the olive oil industry is marketing. Several factors have an impact, such as quality, originality, lobbying, subsidies and the certiﬁcation of extra virgin olive oil. The major problem remains the traceability of the production process to guarantee the origin of the food at all times. This ﬁne-grained traceability can be achieved by applying Blockchain technologies. Blockchain can be used as a solution that could bring visibility to the oil supply chain. It is proposed in order to guarantee the veracity of the product information at different stages. In this paper, a multi-Blockchain, multi-sensor traceability system using IoT will be presented. Two Blockchains that can be programmed via Smart Contract will be used. The ﬁrst one is Quorum, which is a private Blockchain used by the actors of our system, and the second one is Ethereum, which is public and connects the different actors who have access to our system. This smart contract allows us to conta our system to track the olive oil manufacturing process from the farmer, through the oil mill, the transporter and the quality controller to the customer. A general approach for managing the olive oil supply chain is presented. This approach offers the possibility for the system to be conﬁgurable. It is based on smart contracts and applications that interact with the same smart contracts. The IoT is used to conﬁgure sensors. These sensors are the source of data for the supply chain process. These sensors are connected to the embedded platforms that host Quorum.


Introduction
Tunisia is one of the major exporters of olive oil in the world. For decades, several oil producing countries, such as Italy and Spain, have been importing Tunisian olive oil in bulk. The Tunisian oil is mixed with local oils and will be sold under other European brands. However, today, the "liquid gold" of Tunisia is beginning to be exported by the local industry in bottles under Tunisian brands.
The quality of the oil depends on several factors influencing the olive, which are agricultural policies, environmental conditions, olive variety, the industrial processing of olives, storage location and distribution. Generally, this kind of information about these factors is not shared transparently among partners. Thus, customers are often confronted with numerous problems regarding the traceability and originality of the product.
There is therefore an interest in certifying and controlling the quality of extra virgin olive oil. Since a high quality product is very expensive, the oil is vulnerable to fraud and adulteration throughout its processing. Customers are increasingly demanding the quality adulteration throughout its processing. Customers are increasingly demanding the quality of the oil. The authentication of olive oil quality is essential for consumers, as revealed in Figure 1. Blockchain technology is gaining support for various agricultural product applications, including agricultural product tracing and provenance. The data traceability and inclusiveness of Blockchain can reduce fraud and risks regarding food safety.
In this paper, the focus will be laid on the implementation of a system to track the flow of olive oil from farmer to customer to oil manufacturer to quality controller to transporter. The objective is to avoid going through intermediaries or feed sources, as shown in Figure 1. Our system is based on several advanced technologies. Each element of our chain (farmer, manufacturer, quality controller and transporter) has its own system. This system includes the sensors necessary for its application. These sensors are connected to on-board platforms to capture different pieces of information. Such information is then stored in the Quorum private Blockchain. The information that needs to be accessible to the different links of the chain, but also to the customers, is sent via Ethereum. However, confidential data is only recorded on Quorum. They allow the desired traceability.
The main technological innovation in this agricultural application applied to the Tunisian market and particularly to the olive oil market is based on a multi-Blockchain system composed of two Blockchains that communicate with each other, namely a private Quorum Blockchain (suppliers, users, etc.) and a public Ethereum Blockchain that will be accessible to customers. Thus, farmers will be able to use this system to increase their profits and improve their productivity. Customers, on the other hand, will be provided with efficient results.
This study is structured around four parts. The first one is the current state of the art. The implemented approach is then presented before moving on to the result obtained. The paper ends with a conclusion and some perspectives.

Related Works
In order to avoid food fraud, many countries have imposed strict legislation; they have implemented traceability systems to assure consumers. Therefore, the identification of products has become a necessity to ensure traceability. Detecting food fraud requires interdisciplinary knowledge combining food biology, legislation, supply chain management, computer science and mathematics [1]. In this context, Blockchain is an effective solution to the immutable solution of data during all stages of the food supply chain. With this technology, the transparency and the immutability records in the form of digital certificates are guaranteed. Blockchain technology is gaining support for various agricultural product applications, including agricultural product tracing and provenance. The data traceability and inclusiveness of Blockchain can reduce fraud and risks regarding food safety.
In this paper, the focus will be laid on the implementation of a system to track the flow of olive oil from farmer to customer to oil manufacturer to quality controller to transporter. The objective is to avoid going through intermediaries or feed sources, as shown in Figure 1. Our system is based on several advanced technologies. Each element of our chain (farmer, manufacturer, quality controller and transporter) has its own system. This system includes the sensors necessary for its application. These sensors are connected to on-board platforms to capture different pieces of information. Such information is then stored in the Quorum private Blockchain. The information that needs to be accessible to the different links of the chain, but also to the customers, is sent via Ethereum. However, confidential data is only recorded on Quorum. They allow the desired traceability.
The main technological innovation in this agricultural application applied to the Tunisian market and particularly to the olive oil market is based on a multi-Blockchain system composed of two Blockchains that communicate with each other, namely a private Quorum Blockchain (suppliers, users, etc.) and a public Ethereum Blockchain that will be accessible to customers. Thus, farmers will be able to use this system to increase their profits and improve their productivity. Customers, on the other hand, will be provided with efficient results.
This study is structured around four parts. The first one is the current state of the art. The implemented approach is then presented before moving on to the result obtained. The paper ends with a conclusion and some perspectives.

Related Works
In order to avoid food fraud, many countries have imposed strict legislation; they have implemented traceability systems to assure consumers. Therefore, the identification of products has become a necessity to ensure traceability. Detecting food fraud requires interdisciplinary knowledge combining food biology, legislation, supply chain management, computer science and mathematics [1]. In this context, Blockchain is an effective solution to the immutable solution of data during all stages of the food supply chain. With this technology, the transparency and the immutability records in the form of digital certificates are guaranteed.
According to Galvez et al. [2], most traceability management techniques with Blockchain have been developed since 2015. Many research works [3][4][5][6] show that Blockchain is among the best ways to ensure the traceability and transparency of data in an immutable way. Some companies have launched Blockchain projects for proof of concept in supply chains, as shown in Figure 2. According to Galvez et al. [2], most traceability management techniques with Blockchain have been developed since 2015. Many research works [3][4][5][6] show that Blockchain is among the best ways to ensure the traceability and transparency of data in an immutable way. Some companies have launched Blockchain projects for proof of concept in supply chains, as shown in Figure 2. Today, numerous companies are developing Blockchain technologies in the field of the agricultural and food industries. These companies are summarized in Table 1 [7][8][9]. On the other hand, researchers have been studying Blockchain integration in food supply chains. Yu and Huang [10] opted for a Blockchain solution to attain traceability on chickens. They utilized RFID technology to scan the existing QR code on the chicken's claw ring. The chicken's claw ring is designed to be single-use. Tian et al. [11,12] proposed an agricultural food supply chain traceability system in China. Yang et al. [13] exploited Hyperledger as a traceability medium to save information. However, the solution was expensive and slow. Xie et al. [14] developed an IoT solution for tracking agricultural products, allowing data reliability in the case of a malicious attack. However, the cost of transactions on the Blockchain increases with the volume of data.  Today, numerous companies are developing Blockchain technologies in the field of the agricultural and food industries. These companies are summarized in Table 1 [7][8][9]. On the other hand, researchers have been studying Blockchain integration in food supply chains. Yu and Huang [10] opted for a Blockchain solution to attain traceability on chickens. They utilized RFID technology to scan the existing QR code on the chicken's claw ring. The chicken's claw ring is designed to be single-use. Tian et al. [11,12] proposed an agricultural food supply chain traceability system in China. Yang et al. [13] exploited Hyperledger as a traceability medium to save information. However, the solution was expensive and slow. Xie et al. [14] developed an IoT solution for tracking agricultural products, allowing data reliability in the case of a malicious attack. However, the cost of transactions on the Blockchain increases with the volume of data.  [16]. AgriBlockIoT relies on IoT and Blockchain technology to store traceability data. Ethereum and Hyperledger were the two Blockchain platforms tested. According to the results, Ethereum performs better than Hyperledger in terms of latency and CPU usage.
Agricultural supply chain management was proposed by Lin et al. [17]. This system is based on Blockchain, IoT, and a low power wide area network (LPWAN). ERPs were also proposed by Lin et al. [17]. In [18], the different parts of an agricultural supply chain ecosystem were proposed to ensure food security and attain a trusted supply chain. Mondal et al. presented a system based on Blockchain and IoT. This system did not use the greediest consensus-PoW; instead, the authors used different Blockchains PoO (Proof of Object) and PoS (Proof of Stake), in this case [19].
Based on the different approaches used not only in the state of the art but also in some previous works conducted by the researchers [20][21][22], and given the Tunisian technological, retail and infrastructural constraints, an approach that could help to improve olive oil quality as well as optimize the selling price is proposed in this paper. Cutting out the middleman is the best way to avoid fraud and minimize possible commissions. The result is a very high-quality oil with low prices. The most suitable process will be described in what follows. Table 2 represents a comparison of our approach with the different state-of-the-art approaches. These different approaches concern the supply chain applied to olive oil. As presented in Table 2, it is obvious that the different approaches use IoT and are accessible via mobile devices. While in [23,24], the proposed systems are based on databases, in the other approaches [25][26][27][28][29] Blockchain with a purely decentralized system is used. In [30], they proposed a system using Blockchain, which is used by farmers to trace data from wireless sensor networks using a public Blockchain. The implemented approach presents another vision. Indeed, refs. [23,29] use a private Blockchain, whereas our approach uses a permissioned Blockchain (Ethereum) and a private Blockchain (Quorum). Blockchain technology was chosen instead of a distributed system as it is able to trace any transaction made. Thus, no one can modify, delete or change any data that has been added to the block.
In the context of our agricultural application, two Blockchains were chosen: one private and one public, for several reasons. In fact, in the various works that have been carried out in the framework of the supply chain of agricultural products, it should be noted that most of the works use a single Blockchain to which all actors are connected. In the context of Tunisian agriculture and given that the various actors (farmers, transporters, quality service, etc.) are not open to sharing all data, some of which are confidential (customers, suppliers, etc.). To overcome this, a multi-Blockchain system composed of a private Blockchain for the different suppliers is proposed, which allows the preservation of the confidentiality of some data as well as a public Blockchain, which will be accessible to the customer. Thus, the farmers will be able to use this system to increase their earnings and improve their productivity, and the customer will receive the efficient result. The innovation in this framework lies in the fact that two different Blockchains (Quorum and Ethereum) communicate together. The data that need to be shared are sent from Quorum to Ethereum and can then be viewed by the customers.
Indeed, some actors, such as the farmer, the manufacturer and the transporter, do not prefer to submit all the internal data of their company. Therefore, a private Blockchain is used, and our choice of technology is Quorum. Polge et al. [31] compared four major permissioned Blockchain frameworks: Hyperledger Fabric, Ethereum, Quorum, MultiChain and R3 Corda. They demonstrate the higher performance of Quorum compared with the other frameworks, in terms of latency, throughput and privacy. Our choice of Quorum is also based on the fact that this Blockchain is based on the same architecture as Ethereum. Being a public Blockchain, Ethereum allows all steps to be traced. The different consumers will be able to check the transactions, which are displayable for those interested. It is thus possible to show the feasibility of linking two public and private Blockchains and to obtain a reliable and accessible system. The inputs of our system are provided by different sensors that are connected to two embedded platforms. They are Arduino and Raspberry PI.

Proposed Approach
The aim of the proposed work is to allow the implementation of a supply chain system, allowing the follow-up of the routing of the olive oil from the producer to the customer through the oil factory. The proposed system, as indicated here, allows the bypassing of intermediaries to minimize the cost of the production and to secure the system. Anyone who is not part of our Blockchain is automatically excluded. This system therefore allows us to maintain the quality of our production. Our reliable system is achieved through the implementation of smart contracts to store critical data that are immutable and to ensure the monitoring and securing of olive production. Thus, there is a need for: • Implementation of a web application for data entry; • Transfer, processing and storage of information in the Blockchain; • Blockchain implementation on Raspberry PI; • Secure data tracking.
Farmers need to: • Access the system by completing the registration process; • Put products on sale, i.e., the olives, and the necessary details about the product.
The producer needs to: • Access the system by completing the registration process; • Buy the raw materials offered for sale by the farmer; • Put the oil up for sale.
The customer will be able to: • Access the system; • Check the production line through which the product passed. Figure 3 represents the different actors and the steps that will be followed during the implementation of our system.  The system proposed in our paper is presented in Figure 4. The different people who are involved in this system are presented in Figure 3. Thus, there is the farmer, the producer (manufacturing, processing and packaging, quality inspection, transport and logistics) and the customer. Each member of our system will comprise a Blockchain node, which will be implemented on a Raspberry PI3. The smart contract will record each transaction performed. The result of the implementation of our system is illustrated in Section 4.
The Raspberry PI and the Arduino board were chosen for this work to show the feasibility of the system on mobile and low power platforms. Indeed, thanks to the approach proposed, the feasibility of an embedded Blockchain-based system with limited power consumption has been demonstrated. The system proposed in our paper is presented in Figure 4. The different people who are involved in this system are presented in Figure 3. Thus, there is the farmer, the producer (manufacturing, processing and packaging, quality inspection, transport and logistics) and the customer. Each member of our system will comprise a Blockchain node, which will be implemented on a Raspberry PI3. The smart contract will record each transaction performed. The result of the implementation of our system is illustrated in Section 4. The system proposed in our paper is presented in Figure 4. The different people who are involved in this system are presented in Figure 3. Thus, there is the farmer, the producer (manufacturing, processing and packaging, quality inspection, transport and logistics) and the customer. Each member of our system will comprise a Blockchain node, which will be implemented on a Raspberry PI3. The smart contract will record each transaction performed. The result of the implementation of our system is illustrated in Section 4.
The Raspberry PI and the Arduino board were chosen for this work to show the feasibility of the system on mobile and low power platforms. Indeed, thanks to the approach proposed, the feasibility of an embedded Blockchain-based system with limited power consumption has been demonstrated.

Proposed Architecture
Based on the approach proposed in Figure 4, researchers have realized a complete system that creates the supply chain of farmers, oil manufacturer, quality control company and, finally, the transporters. Figure 5 shows the system that has been set up and is described in the proposed approach section. Our system, as shown in Figure 5, has five parts: four private parts and a public part that connects the parts of system to each other. The platform presents four systems: one for the farmer, one for the transporter, one for the oil manufacturer and, lastly, one for the quality control process. These different private systems send the characteristic transactions to the Ethereum Blockchain. As shown in Figure 5, each actor has its own private Blockchain. In this Quorum Blockchain, the actor enters all the data that are specific to their part of the system. For example, the farmer handles data related to their agricultural fields (humidity, temperature, salinity, etc.), to the different agricultural actors (fertilizers, medicines, suppliers, etc.) and to the harvest (olives, wood, etc.).

Proposed Architecture
Based on the approach proposed in Figure 4, researchers have realized a compl system that creates the supply chain of farmers, oil manufacturer, quality control co pany and, finally, the transporters. Figure 5 shows the system that has been set up and described in the proposed approach section. Our system, as shown in Figure 5, has f parts: four private parts and a public part that connects the parts of system to each oth The platform presents four systems: one for the farmer, one for the transporter, one the oil manufacturer and, lastly, one for the quality control process. These different priv systems send the characteristic transactions to the Ethereum Blockchain. As shown in F ure 5, each actor has its own private Blockchain. In this Quorum Blockchain, the ac enters all the data that are specific to their part of the system. For example, the farm handles data related to their agricultural fields (humidity, temperature, salinity, etc.), the different agricultural actors (fertilizers, medicines, suppliers, etc.) and to the harv (olives, wood, etc.).
Some of these data are confidential and specific to the farmer. Others are pub (quantity of olives, quantity of wood). These data will also be recorded in the public Blo chain of our general system. Thus, such transactions will be saved in the Ethereum Blo chain. The different nodes of this Blockchain are saved on embedded platforms (Ra berry PI 4). The different aspects thereof are detailed hereafter.

Farmer Architecture
As described in Figure 5, each component of our ecosystem will have its own priv system. Thus, a farmer will have their own platform. As far as farmers are concerned, th will be able to enter the inputs and outputs of their fields in terms of products, see fertilizers, etc. Intrinsic data of the fields, such as humidity, salinity, soil PH, etc., are c lected from analog sensors. These sensors sends the data to an Arduino platform to ret their accuracy. This platform sends its data to Raspberry PI. Raspberry PI acts as a w server but also as a host platform for the Quorum Blockchain. All data will be saved a Some of these data are confidential and specific to the farmer. Others are public (quantity of olives, quantity of wood). These data will also be recorded in the public Blockchain of our general system. Thus, such transactions will be saved in the Ethereum Blockchain. The different nodes of this Blockchain are saved on embedded platforms (Raspberry PI 4). The different aspects thereof are detailed hereafter.

Farmer Architecture
As described in Figure 5, each component of our ecosystem will have its own private system. Thus, a farmer will have their own platform. As far as farmers are concerned, Electronics 2022, 11, 3394 8 of 17 they will be able to enter the inputs and outputs of their fields in terms of products, seeds, fertilizers, etc. Intrinsic data of the fields, such as humidity, salinity, soil PH, etc., are collected from analog sensors. These sensors sends the data to an Arduino platform to retain their accuracy. This platform sends its data to Raspberry PI. Raspberry PI acts as a web server but also as a host platform for the Quorum Blockchain. All data will be saved and only the farmer and their associates will be able to access them. Transactions intended for the public (the other components of our system as well as the clients) will be sent to the embedded system comprising the Ethereum nodes.
The Ethereum Blockchain has the characteristic of being accessible to everyone. Figure 6 shows the farmer's platform. only the farmer and their associates will be able to access them. Transactions intended for the public (the other components of our system as well as the clients) will be sent to the embedded system comprising the Ethereum nodes. The Ethereum Blockchain has the characteristic of being accessible to everyone. Figure 6 shows the farmer's platform.
The sensor nodes are vulnerable to various malicious attacks. They can also suffer from drift or bias, which makes it challenging to ensure the correctness of the collected data. In [32], the authors proposed Blockchain-based trust management based on a noncooperative game in order to detect malicious data. In [33], the authors proposed a gossipbroadcasting-based referendum consensus to overcome the faulty nodes issue. For future work, it is recommended that a fault-tolerant system with build-in resilience against malicious behavior should be built.

Manufacture Architecture
As far as the oil manufacturer is concerned, the input will be the olives purchased from the farmer and the final product will be the pressed and packed olive oil. The intrinsic data to be collected are PH, salinity, temperature and humidity. These data are analog data connected to an Arduino platform. These data enable optimizing the energy consumption, the quality and the internal parameters of the oil. The latter will send its data to the Raspberry PI connected to the Quorum Blockchain. All data will be saved by the oil manufacturer and will be accessible by its employees. Transactions intended for the public (other components of our system as well as customers) will be sent to the embedded system comprising Ethereum nodes. Figure 7 shows the manufacturer's platform. The sensor nodes are vulnerable to various malicious attacks. They can also suffer from drift or bias, which makes it challenging to ensure the correctness of the collected data. In [32], the authors proposed Blockchain-based trust management based on a noncooperative game in order to detect malicious data. In [33], the authors proposed a gossipbroadcasting-based referendum consensus to overcome the faulty nodes issue. For future work, it is recommended that a fault-tolerant system with build-in resilience against malicious behavior should be built.

Manufacture Architecture
As far as the oil manufacturer is concerned, the input will be the olives purchased from the farmer and the final product will be the pressed and packed olive oil. The intrinsic data to be collected are PH, salinity, temperature and humidity. These data are analog data connected to an Arduino platform. These data enable optimizing the energy consumption, the quality and the internal parameters of the oil. The latter will send its data to the Raspberry PI connected to the Quorum Blockchain. All data will be saved by the oil manufacturer and will be accessible by its employees. Transactions intended for the public (other components of our system as well as customers) will be sent to the embedded system comprising Ethereum nodes. Figure 7 shows the manufacturer's platform.

Quality Process Architecture
Regarding the quality process, oil bottles already have been tested as input and will have a quality certificate as a result. After checking the peroxidation, acidity and wax of the oil, these data will be stored on the Raspberry PI, which is connected to the Quorum Blockchain. The data collection in this case is still manual. All the data will be saved by the oil quality control system and will be accessible by its collaborators. Transactions intended for the public (other components of our system as well as customers) will be sent to the embedded system comprising Ethereum nodes. Figure 8 describes the quality controller platform.

Quality Process Architecture
Regarding the quality process, oil bottles already have been tested as input and will have a quality certificate as a result. After checking the peroxidation, acidity and wax of the oil, these data will be stored on the Raspberry PI, which is connected to the Quorum Blockchain. The data collection in this case is still manual. All the data will be saved by the oil quality control system and will be accessible by its collaborators. Transactions intended for the public (other components of our system as well as customers) will be sent to the embedded system comprising Ethereum nodes. Figure 8 describes the quality controller platform.

Quality Process Architecture
Regarding the quality process, oil bottles already have been tested as input and will have a quality certificate as a result. After checking the peroxidation, acidity and wax of the oil, these data will be stored on the Raspberry PI, which is connected to the Quorum Blockchain. The data collection in this case is still manual. All the data will be saved by the oil quality control system and will be accessible by its collaborators. Transactions intended for the public (other components of our system as well as customers) will be sent to the embedded system comprising Ethereum nodes. Figure 8 describes the quality controller platform.

Transporter Architecture
As for the transporter, it will have the certified oil bottles that will be offered to the customers in the big stores as the input. The intrinsic data to be collected are the CO 2 , temperature and the humidity of the transport car. These data are analog data connected to an Arduino platform. They will be sent, along with the GPS location, in order to describe the path of the transporter to the Raspberry PI connected to the Quorum Blockchain. All data will be saved by the oil manufacturer and will be accessible by their associates. Transactions intended for the public (other components of our system as well as customers) will be sent to the embedded system comprising Ethereum nodes. Each Quorum Blockchain is owned by the actor who uses it (quality process, farmer, manufacturer and transporter). Thus, the smart contract set up for each actor allows the recording of any data inserted in the system as a transaction. For example, as soon as the transporter picks up the cargo, the temperature, the CO 2 content and the GPS location are automatically recorded at regular time intervals.
Every hour, the GPS location, temperature and CO 2 content are concatenated in a single transaction. The transaction is then encrypted and can only be decrypted through the transporter's key. At the end of the transport operation, the system saves a specific transaction that includes the departure time, the arrival time, the minimum and maximum temperature values and the minimum and maximum CO 2 content values. This last transaction is sent to the Ethereum Blockchain to be accessible to the public (customers) who can access the olive oil traceability system. In the following section the implementation of the Blockchain on the Raspberry PI will be described.

Implemented Blockchain on Raspberry PI
In terms of low power consumption [34][35][36][37][38], a Raspberry Pi platform has been chosen for the implementation of our application, for many reasons. The raspberry PI has the characteristics of a PC with a minimalist configuration. It offers a multiprocessor architecture with a GPU that allows access to a good computational capacity. It offers different peripherals in order to be able to connect and use several peripherals. Since the data do not require significant computational capabilities, Raspberry Pi will be used as a receptacle for the Blockchain used by the researchers. Therefore, Ethereum will be used as the Blockchain implemented in Raspberry. The result of our work is described in Figure 9. The Blockchain, as well as the different transactions performed, is provided. In Figure 9, a virtual machine on which Raspbian OS is installed has been used. However, the implementation of our Blockchain goes through several steps that will require the use of several tools. To test the custom Ethereum Blockchain, Ganache will be used. The truffle tool will be the provider of our smart contract and, finally, MetaMask will be our crypto wallet. Figure 10 describes the different tools used and already described. [39]  The data were recorded using smart contracts. Smart contract is managed by the organization that takes care of preparing and maintaining the traceability of our system. In the context of this work, this body could be the supervisory ministry (Tunisian Ministry of Agriculture), which makes it possible to enhance the product exported through this system. It is noteworthy that the communication between the two Blockchains is achieved via the internet using the Web3 technology as a bridge between the two systems.
However, the implementation of our Blockchain goes through several steps that will require the use of several tools. To test the custom Ethereum Blockchain, Ganache will be used. The truffle tool will be the provider of our smart contract and, finally, MetaMask will be our crypto wallet. Figure 10 describes the different tools used and already described [39]. However, the implementation of our Blockchain goes through several steps that will require the use of several tools. To test the custom Ethereum Blockchain, Ganache will be used. The truffle tool will be the provider of our smart contract and, finally, MetaMask will be our crypto wallet. Figure 10 describes the different tools used and already described. [39]  After the smart contract, the Ganache result is presented in Figure 11. It is clear that all transactions are hashed to secure the outcomes. After the smart contract, the Ganache result is presented in Figure 11. It is clear that all transactions are hashed to secure the outcomes. After describing the Blockchain implementation, we will now highlight the mobile device aspect used to consult as well as move our transactions via Blockchain.

Web Application
Regarding the application aspect, the authors propose a system that has been realized using Flatter. Our realized web application is shown in Figure 12. The goal is to use a mobile application that can be used both on Android and IoS. Figure 12 shows the agriculture registration aspect. After describing the Blockchain implementation, we will now highlight the mobile device aspect used to consult as well as move our transactions via Blockchain.

Web Application
Regarding the application aspect, the authors propose a system that has been realized using Flatter. Our realized web application is shown in Figure 12. The goal is to use a mobile application that can be used both on Android and IoS. Figure 12 shows the agriculture registration aspect.
After describing the Blockchain implementation, we will now highlight the mobile device aspect used to consult as well as move our transactions via Blockchain.

Web Application
Regarding the application aspect, the authors propose a system that has been realized using Flatter. Our realized web application is shown in Figure 12. The goal is to use a mobile application that can be used both on Android and IoS. Figure 12 shows the agriculture registration aspect.  After selling olives to the manufacturer to extract olive oil, the transaction was saved on the Blockchain. In Figure 13, the confirmation of the executed transaction is provided. It represents the oil manufacturer interface. After selling olives to the manufacturer to extract olive oil, the transaction was saved on the Blockchain. In Figure 13, the confirmation of the executed transaction is provided. It represents the oil manufacturer interface. The third application actor was the customer, who can access the system to check the identity of the olive producer as well as the oil manufacturer before buying the oil. Figure  14 illustrates this.  The third application actor was the customer, who can access the system to check the identity of the olive producer as well as the oil manufacturer before buying the oil. Figure 14 illustrates this. Figure 13. Monitoring and securing production: oil manufacturer interface.
The third application actor was the customer, who can access the system to check the identity of the olive producer as well as the oil manufacturer before buying the oil. Figure  14 illustrates this. It is important to notice that each actor in our system has access to a crypto-wallet MetaMask to perform the necessary transactions in our system. Each transaction performed by the system needs Ethereum gas to be validated. This crypto money is displayed via MetaMask. It is important to notice that each actor in our system has access to a crypto-wallet MetaMask to perform the necessary transactions in our system. Each transaction performed by the system needs Ethereum gas to be validated. This crypto money is displayed via MetaMask.

Discussion
In the implementation of olive oil supply chain systems, this study can be divided into three parts: detailed centralized systems, generic public decentralized systems and detailed private decentralized systems. The architecture of the centralized systems is based on a backup on the cloud and only allows access to authorized people. This system is certainly efficient, but the fact that it is centralized gives the administrator the right to control the entire platform.
To remedy this problem, decentralized systems give more freedoms and rights to different actors. Indeed, decentralization allows the democratization of the process of supply chains and the treatment of the different systems.
Thus, some companies use their own secure private Blockchains to track their products. The problem with this kind of approach is that it is totally inaccessible for people who are not part of this network and thus cannot access the information. So, if the process inside the company is decentralized, the system remains closed to the outside. Let us now move to the last case. Using a fully public Blockchain allows anyone to access and verify product information. This being the case, confidential information could be accessible, which would go against the policies of some manufacturers and/or farmers.
To overcome this, a system that allows different partners to maintain the industrial secrecy of certain data by using a private Quorum Blockchain has been set up. This decentralized system is based on different embedded platforms for the different actors: the farmer (Arduino, sensors and Raspberry PI), the oil manufacturer (Sensors, Arduino, Raspberry PI), the transporter (sensor, sensors, mobile, raspberry PI) and the quality control company (Raspberry). These decentralized platforms are private and therefore the information they store is only accessible to the associates of each actor.
As for the information that is accessible to anyone, including actors, customers, supermarkets, etc., it will be sent to a Ethereum Blockchain. Ethereum was chosen because it is compatible with the Quorum Blockchain for the transfer of information and communication between the two Blockchains. Each Raspberry PI will carry an Ethereum node. People can thus access this Blockchain to see the life cycle of the product from the tree to the olive, to the manufacturer, and to the quality controller through the various carriers. This traceability will enhance the quality of the product while giving satisfaction to the customer.
As part of this work, a prototype of an application has been implemented to secure and realize the traceability of our product. As a case study, the Ethereum Blockchain has been chosen. It is possible to use Ethereum as a permissioned Blockchain and to apply an application-specific value for transaction gas. This value can be very small. It will therefore be added to the price of the bottle of olive oil. For example, 10% can be added to the price of a bottle. This addition will be the cost of the transactions made on Ethereum from the picking of the olives until they reach the customer.
Several contributions from the literature are presented and compared. Indeed, in the agricultural domain, users utilize embedded systems without Blockchain or Blockchain without embedded systems. IoT sensors are used in different systems. As such, our contribution lies in the use of low power and low resource platforms with IoT sensors. If in other systems, the use of a multi-Blockchain system is possible [40], the value and advantage of this work is the use of a private and a public Blockchain. The former is used by different actors who do not want to reveal their customers or suppliers. The latter is accessible to anyone who wants to buy the product. Thus, customers will be able to trace any transaction related to the product. Thus, the second contribution lies in the use of two different Blockchains to enable the implementation of a heterogeneous agricultural platform that is secure and traceable.
In terms of power consumption, the low power factor has become an important issue, especially for Blockchain, which is energy intensive. The Raspberry platform based on multi-core architecture solves the power consumption problem despite its low computing power compared to a processor of the x86-64 family. This encourages the adoption of a low-power Blockchain approach.
For agriculture applications, the real time aspect is not dominant, especially for the private Blockchain. In our case and based on previous work [40], it has been noticed that despite the performance loss with Raspberry (16 times) % x86-64 Xeon for example, there is a very significant energy gain (26 times) that largely compensates for the performance loss, especially for applications without real-time constraints. Thus, the migration to the Raspberry architecture offers an overall energy gain of more than 61% [40] compared to the Xeon processor and a greater gain compared to the Radeon VII GPU, for example, which consumes more than 200W.
Nonetheless, the proposed system has certain shortcomings that could be improved. It remains quite complex and requires many platforms working in parallel (Raspberry [30] + Arduino + FPGA [41,42]). The feasibility of the system has been proven and the concept has been shown to be functional. Nonetheless, it would be adequate to optimize the size and the cost as well as the energy consumption by creating an embedded design of a platform that would be optimized for each actor according to their needs. The Ethereum 1.0 with PoW consensus was chosen. The compatibility and security of our platform, however, could be tested using Ether 2.0, which uses PoS consensus.

Conclusions
This article has presented a system to highlight the security of information related to the entire olive oil production process using Blockchain. The system proposed is simple because it allows each actor to have their own private Blockchain. This permits the maintenance of the confidentiality of the data related to the product. Thus, each actor is