0% found this document useful (0 votes)
37 views15 pages

Blockchain in Smart Agriculture

The document proposes a blockchain-enabled framework for securing the food supply chain using industrial IoT. It aims to improve transaction efficiency, reduce risk, and provide trust between participants in the supply chain by leveraging smart contracts on a blockchain platform. The framework maintains data confidentiality while enabling trusted information sharing between stakeholders. It also includes a group signature scheme to revoke signers in cases of misuse or dispute.

Uploaded by

Neha Neha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views15 pages

Blockchain in Smart Agriculture

The document proposes a blockchain-enabled framework for securing the food supply chain using industrial IoT. It aims to improve transaction efficiency, reduce risk, and provide trust between participants in the supply chain by leveraging smart contracts on a blockchain platform. The framework maintains data confidentiality while enabling trusted information sharing between stakeholders. It also includes a group signature scheme to revoke signers in cases of misuse or dispute.

Uploaded by

Neha Neha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A Blockchain Enabled Security of Food Supply

Chain System for Smart Agriculture using IIoT


Kakali Chatterjee, Ashish Singh, and Neha

Abstract
With the increasing development of global markets, agriculture and food supply chains are rapidly growing. On
a worldwide basis, industrial IoT is fast changing how farmers grow food, and people gain access to nutritious food.
Because food consumers are more concerned about transparency, accountability, and food quality, the food sectors are
concentrating their efforts on these areas. Due to the growing number of food safety and contamination risk concerns
linked with the food supply chain, there is an overwhelming demand for a traceability solution for the food supply
chain to monitor the quality and provide proper protection of items in the agricultural supply chain. Blockchain plays
a groundbreaking role in product traceability in the agricultural food supply chain. The paper proposes a framework
which uses the concept of smart contracts. All the entities engaged in the blockchain-based supply chain network
handle the transaction between parties. All transactions are recorded on the blockchain’s permanent ledger, giving
everyone high transparency and traceability across the supply chain ecosystem. In the event of abuse detection, a
group signature mechanism is also used. After implementing the framework, the performance is measured regarding
latency and gas consumption.

Keywords
Blockchain, Smart contracts, traceability, Supply Chain, Industrial IoT.

1. I NTRODUCTION
The Internet of Things (IoT) is a very emerging technology. This technology supports the industry’s
applications in great revenue generation and social environments [1]. The internet of things is increasing in
many areas of industry like banking and financial sectors, manufacturing sectors, transportation, healthcare,
government sectors and many more [2]. Now the IIoT, industrial IoT (IIoT) concentrates on the avail of
IoT services in these sectors and builds a bridge between the existing industrial procedures and emerging
technologies like smart sensors, robots, machine-to-machine, big data analytics, and artificial intelligence.
One of the most popular use cases of IIOT is the supply chain. In the fast-growing modern world,
supply chains are transforming daily into more automated and incredibly complex networks emerging
as a significant source of great benefits. Around the same time, people are now more concerned about
the quality of food products. The globalization of goods creates a renewed emphasis on quality, safety,
validation, and many more significant criteria in agricultural food supply chains [3]. In the recent day,
people favour an organic variety of food and beverages after paying more prices for them. Consumers have
great expectations about the quality of organic foods. They want to know all information about the product,
such as using pesticides, hormone modifications, and every footprint from its origin. A food supply chain
(FSC) refers to the supply chain system where the collection and communication records of the food item’s
journey from the origin are preserved [4]. This journey includes production, processing, distribution, and
consumption, where several intermediate nodes are involved. The data collection of these food items is
mainly done through the barcodes or RFID tags, and three primary industries: Agriculture, food processing
and distribution industries are mainly involved here. Traceability of the food product in the supply chain
is now more in demand of the consumers with food quality. Now supply chain authorities started to build
Kakali Chatterjee is associated with the Department of Computer Science & Engineering, National Institute of Technology Patna-800005,
Bihar, (India).
Ashish Singh is associated with the School of Computer Engineering, KIIT Deemed to be University, Bhubaneswar-751024, Odisha (India).
Neha is associated with the Department of Computer Science & Engineering, National Institute of Technology Patna-800005, Bihar, (India).
E-mail: [email protected] (Kakali Chatterjee), [email protected] (Ashish Singh), and [email protected] (Neha).
consumers’ trust by supplying all information accurately to comply with credibility, integrity and quality.
Several regulatory authorities proposed their standards [5]–[12] to improve the transparency and traceability
of the food supply chain. Now they are moving from centralized to distributed systems for advantages of
fault tolerance, scalability, and better storage systems [13], [14]. Blockchain is one of the best solutions for
secure information sharing in distributed systems.

1.1 Research Objective and Contribution:


The conventional agricultural food supply systems have three fundamental flaws. First, there are numerous
actors in the supply chain, and communication between them is inconvenient, resulting in a lengthy
supply chain cycle. Then, because of the many participants with their dispersion across several networks,
information exchange is inadequate, with no data trust. Finally, the agricultural food supply chain is a
centralized system with authority concentrated in the hands of the central management, and data can be
easily manipulated. There are many supply chain management systems based on OR codes, RFID tags, etc.,
to solve the food supply chain traceability problem. But most of them suffer from a single point of failure,
those results in the collapse of the whole system for single node failure. The rise of blockchain technology
efficiently solves the drawbacks of food supply chain traceability systems. The new blockchain technology
has enormous promise for the fourth industrial revolution, with the ability to have a major influence on
the food sectors of the economy. Furthermore, the blockchain can potentially improve the interoperability
issue IIoT significantly. The decentralized nature of blockchain technology will play an important part in
the distributed networks where the different suppliers and distributors share data that can be trustable. In
such a scenario, smart contracts can be used applications that include transactions and interaction. Hence,
this work aims to solve the traceability problem of the food supply chain using smart contracts and improve
transaction efficiency, reduce risk, and provide trust between participants. This paper aims to provide end-
to-end solutions for the agricultural food supply chain to remove this gap. The main contributions are as
follows:
• A Blockchain Platform for Industrial IoT for developing supply chain tracking applications where
automated transactions are performed on delivery confirmations.
• The proposed solution also maintains the confidentiality of data among all stakeholders while sharing
information in a trusted manner.
• A group signature scheme is applied to revoke the signer’s identity in case of misuse or dispute.
The rest of the paper is structured as follows:
The background is discussed in section 2. The Proposed model is discussed in Section 3. The working
model of the Blockchain based system is discussed in Section 4; Section 5 presents Implementation and
Performance Analysis; lastly, concluded in Section 6.

2. BACKGROUND
2.1 Blockchain Platform for Industrial IoT (BPIIoT)
The blockchain platform can be used for the industrial internet of things in smart manufacturing systems
by providing a decentralized, peer to peer network for industrial applications. Generally, a cloud-based
manufacturing model is used, which is a service-oriented model. The approach [15] is built on a blockchain
network used to implement smart contracts. The smart contract functions as an agreement between con-
sumers and manufacturers to provide on-demand services such as manufacturing, billing etc. In Figure 1,
the framework used IoT devices that allow the sensors to communicate with the cloud and the blockchain
network. The IoT device allows machines to data exchange with the cloud while the transaction sends on
smart contracts and accepts transactions from the peers on the blockchain network. The BPIIoT platform
has several advantages explained below:
• It can be used in manufacturing where the machines will have their blockchain accounts. The user
will be able to do transactions to avail of manufacturing services like the on-demand model.
Fig. 1: Blockchain Platform for IIoT
• It may be used for automatic diagnostic and device protection in which the device can reveal states,
diagnose issues, and region alternative requests.
• It may be used for growing traceability packages for manufactured products.
• It can be used for developing supply chain tracking applications where automated transactions are
performed on delivery confirmations.
• It may be used for product certification in which production statistics for a product may be recorded
on the blockchain.
• It can be used for tracking the supplier’s identity and tracking various performance parameters such
as delivery time, customer reviews etc., for reputation.

2.2 Industrial IoT Issues and challenges


The new blockchain technology has the potential to improve industrial systems and the Internet of Things
(IoT) by offering redundancy, immutable storage, and encryption to applications. Several applications in
industrial IoT (IIoT) have evolved in recent years, and blockchain technologies have caught the interest of
both industry and academic academics [16]. Over the last decade, the IIoT has received a lot of research
interest and is fast becoming one of the primary technologies for enhancing manufacturing and industrial
processes [17]. The Industrial Internet of Things promises real-time data processing, long-term and predictive
maintenance etc., for accurate and consistent results. The IIoT undoubtedly help all industrial sectors,
including agriculture, manufacturing, energy and utilities, and municipal services, By enhancing efficiency,
generating new business models, creating new income streams, and improving safety and risk management.
The essential needs in IIoT systems are depicted in Figure 1, and the trustworthiness of the supply chain
may substantially impact each participant’s operation. The blockchain can give fundamental aspects of
transparency, traceability, human rights respect, and regulatory compliance to industrial sectors efficiently
and cost-effectively [18].
The IIoT platform is critical in IIoT systems because it can offer smart linked operations, connect assets,
and allow IIoT with the following capabilities: connection, big data analytics, and application development.
To overcome the challenges as mentioned above, the IIoT platform should meet the requirements of: asset
perceptibility, technology mixing, ageing staff, data storing, cyber security. Some blockchain platforms for
IIoT, such as multichain [19], [20], Litecoin [21], Lisk [22], Quorum [23], and HDAC [?], give traceability,
trustworthiness, and other benefits to IIoT applications. These blockchain systems may be measured using
energy usage, cup utilization, memory use, block size, etc. There are some full and lightweight nodes in the
blockchain to restrict resources. The blockchain can permit IIoT systems to connect with untrusted devices
in a distributed and verifiable manner. There are six components: IIoT resource network, IIoT Blockchain
network, management hub, key server, client, and smart contract. Although several research efforts have
been made in recent years, some challenges exist in blockchain and IIoT. Some of the challenges are:
• Anonymity preservation in decentralized IIoT systems is difficult
• Information modelling is a major challenge in a decentralized environment.
• Supporting infrastructures in the blockchain-enabled IIoT
• Device reliability in the IIoT requires high with low latency
As blockchain is decentralized and anonymous, it isn’t easy to manage because it does not rely on
trustworthy entities. Blockchain’s high anonymity can lead to illegal activities like fraud, money laundering,
and drug smuggling. As a result, we design a blockchain system architecture that allows higher user
anonymity while protecting organizational-level privacy.

2.3 Related Work


Blockchain plays a groundbreaking role in product traceability as in the agricultural food supply chain.
The food Supply chain mainly includes production monitoring, packaging and traceability management in
the agricultural supply chain to improve the quality and safety of food. Lin et al. [24] have designed a
decentralized framework based on the blockchain and compared it to conventional mainstream systems,
and established the system is superior in terms of ability to tamper-proof; security and privacy; the degree
of decentralization; the amount of on-chain data. Tao et al. [25] have proposed” HMDBC” a hierarchical
multi-domain blockchain network structure with a secondary check function that can correct and delete the
malicious supervision node. Using smart contracts in accordance with food industry standards, this device
will carry out automated food quality identification and notification for low food in the industrial supply
chain. Li et al., [26] presented a food traceability system based on QR codes for the dairy supply chain.
It enhances transparency from production to sales and creates a food traceability platform. On the other
hand, QR codes are unsuitable for live organisms such as chickens and ducks and are readily destroyed by
pollutants. Because of its low cost and compact size, RFID is the most extensively utilized IoT technology
for achieving food traceability. Zhang et al. [27] created a full life cycle food traceability system that uses
RFID technology to track the whole process from source to consumption. At the same time, the RFID
fault-tolerant mechanism is intended to assure the system’s viability. Tian [28] suggested using blockchain
and IoT to trace food supply chains based on hazard analysis and critical control points (HACCP). IoT
technology automatically gathers and saves information, increases information dependability, and improves
food safety. Blockchain can ensure that data is not altered after the chain, increasing the credibility of
traceable information. However, data volumes are always expanding, so the blockchain cannot contain
it all. Hao [29] investigated a traceable storage method that used IPFS and secondary databases. IPFS
is distributed file system storage and sharing mechanism. To obtain data from the IPFS, first access the
transaction hash from the secondary database and then the IPFS hash from the blockchain. This method
overcomes the problem of blockchain data explosion, but if the secondary database fails, the entire system
crashes. Smart contracts’ self-execution and self-verification properties have made them widely employed
in food safety traceability systems with the advent of the blockchain 2.0 era. Wang et al. [30] presented a
product quality management system that records all product interactions indefinitely using smart contracts
technology. Mondal et al. [31] constructed a transparent food supply chain employing object-based validation
standards. It is a real-time quality monitoring with RFID sensors at the physical level and blockchain
technology at the network level. Omar et al. [32] presented a blockchain-based method that uses Ethereum
smart contracts and a decentralized storage system to automate processes and information exchange. It
also captures the detailed interaction algorithm between supply chain stakeholders, providing them with a
compact, safe, reliable, and transparent communication mode. Xuan et al. [33] suggested an evolutionary
game theory-based data sharing incentive model that uses blockchain with smart contracts to dynamically
change the excitation parameters and continually motivates users to participate in data sharing. Tso et
al. [34] developed the first decentralized electronic voting and auction systems based on a blockchain and
smart contract, which increased participant anonymity, data transmission privacy, and data dependability and
verifiability. Shahid [35] used the Ethereum blockchain network to propose a blockchain-based reputation
system in the agriculture and food supply chain, using major aspects of the blockchain and smart contracts.
The authors suggested a decentralized storage method based on Ethereum in [36]. The adoption of IPFS
eliminates the issues associated with centralized storage of sensitive data breaches and single points of
failure. Before storing data in IPFS, the file is encrypted using the file encryption technique, and the
ciphertext is uploaded to IPFS, resulting in the hash value of the saved file being recorded in Ethereum.
The proposed technique, however, would not perform successfully in an IoT environment due to the high
computing cost.

3. P ROPOSED SYSTEM FRAMEWORK FOR F OOD S UPPLY CHAIN


In this section, the blockchain framework generates a certificate for each food item verified during
purchase. The description of the proposed model is explained in figure 2.

• Raw Material Supplier: The farmer supplies vegetables and food grains to the Suppliers who are
Fig. 2: System model of the blockchain-based food supply chain

mainly connected with the food industry. These raw materials are supplied to the industry for manu-
facturing food items.
• Food Industry: The food industry purchases raw materials from the farmer, refines the raw materials,
eliminates foreign material, and does the packaging and sends it to the distributor.
• Distributor: A distributor distributes the final product to the warehouse.It will maintain the shipment
date, order number, and barcode.
• Retailer: A retailer operates a warehouse by purchasing the finalized products from the distributor, and
it is responsible for selling them to the retailers. Retailer buys finished products from the distributor
in lots or batches and finally sells them to customers in small quantities.
• End consumer: Buys product from an online retailer using apps. Consumers can scan QR codes
from the app and get complete information from the manufacturing place to the end. It can also give
feedback on the product.
The main stakeholders, including manufacturing and logistics parties (raw material source, farmer, food
industry, distributor, wholesaler and retailer) and end customers, are linked through the Blockchain. Supply
chain networks initially start with a selection of “validator” nodes, including the members associated with
regulatory agencies that would only authorize new Blockchain transactions from the producers and the
logistics providers only after confirming their quality assurance. IoT devices attached to the products
allow data collection automatically and automatically upload to the blockchain network without human
interference. These devices may include IoT sensors, RFID, QR codes, and API Gateways. Smart Contracts
are structured to be automatically tamper-proof and settle contract violations. The Blockchain will be self-
governing to guarantee the authenticity of the product’s provenance and purity, these smart contracts are
written using programming languages that are automatically implemented on a distributed computer system.
They automatically get triggered and perform required actions to fulfil a required programmed condition. For
example, the distributors, wholesalers, and retailers can use Blockchain Smart Contract to match suppliers,
orders, invoices, and shipments and automatically make payments. The end-user (customer) will check the
QR or the bar-codes of the final product using their mobile app to display all the details about that specific
product. For all prospective stakeholders, reviews and ratings may also be gathered and registered on the
Blockchain to further view and improve their service.

4. W ORKING M ODEL OF F OOD S UPPLY C HAIN


In this model, all stakeholders like food suppliers, industry, distributors, retailers and consumers have
registered initially and sent details like name, address, phone no, area code etc.
• The food supplier sends a request to generate the public and private keys to the central authority (food
industry) for secure message transactions. It is performed through a DApp.
• The key generation function executes to generate the public and private keys for the food supplier and
central authority.
• The distributor and retailer also send a request to generate the public and private key to the blockchain
network, which carries the distributor details to the central authority with its identity.
• After the initial stage of smart contract setup, it will check whether the food industry requesting raw
material is registered and whether the price is paid. If the desired conditions are met, then the contract
state changes to “Request Submitted”, the company state changes to “Wait”, and the state of the Raw
material supplier changes to “Agree to sell”.
• The contract will notify every active member in the blockchain network about the change of state.
Otherwise, the contract status and other participating members will return to the initial state and the
transaction aborts.
• Similar way, the smart contracts for distributor and retailer is maintained by the blockchain network.
• When the consumer requests food items, the item list is placed in an encrypted form to the retailer
through the mobile application.
• The item details and payment details are placed in an encrypted form to the company (food industry).
• The payment gateway decrypts the payment details for transactions, and after a successful transaction,
it will include in the smart contract.
• After a valid transaction, the blockchain network sends the permission to the company to send the
item to the customer and a certificate will be issued.
The proposed framework works in different layers using smart contracts. The proposed framework consists
of users that could be suppliers, food industry, distributors and retailers. Due to the differences in authority
level, there were given granular access to the system. The framework has three layers described below:
TABLE I: Notations used with their description
Notation Description
U N ame Registered user name
P N ame Product name
U Addr Address details of all registered users
B N etw Blockchain network
F req Request function executed by the mobile app
P ub {R} Public key of the retailer
P rv {R} Private key of the retailer
P ub {C} Public key of the consumer
P rv {C} Privat key of the consumer
Gen() Generate function for public and private key
St serv Storing data to the server
Con Cert Certificate generated by the retailer
Hash() Hash function used
Gen b() Block generation function
T ID Transaction identity
P ID Product identity
O ID Order identity
C ID Order identity
C M ID Customer mail identity
C P No Customer phone number

1) Layer-1 (User layer)


This framework uses suppliers, the food industry, distributors and retailers for customers and retailers
who first perform registration through mobile apps. After the user request, the mobile app verifies the
user request, and for valid verification, it forwards the request message to the blockchain network for
public/private key generation. The blockchain network processes it and generates the key pair to share
with the node. This layer’s various tasks are creating, updating, reading, and deleting customer item
records. The food supply GUI DApp contains all the users have access to for interacting with the
blockchain layer.
2) Layer-2 (BlockChain Layer)
This layer contains the code used for interaction between the user and the Dapp. Each transaction is
processed with a unique identity known as TI d in this layer. The network includes transactions like:
Add Product records on the food item packed from the food industry. This record is stored in the block.
It contains fields like item name, packing date and time, expiry date, ingredients, BER code, hash code
etc. Update Product records will carry any updates on packaging delay, unavailability etc., of the food
item, which is also included in the block information. View Product records will allow the user to see
all the food items through the DApps. All users can view the records and update information related
to the food items.

Smart contracts
Smart contracts are the most crucial component of a DApp, simply a piece of software stored on a
blockchain network. A smart contract is composed of executable code and state variables. The functions
are executed when transactions are made to these functions. Here a smart contract for Sales Product is
deployed where the contract owner can sell products to buyers. The supplier can add a Product name
(PN ame), product ID (PI D), inventory (PI nv), price (Pr) etc. The registered customers can place an
order to buy products by sending a transaction to the contract. When the transaction is sent, the user
is prompted for the Externally Owned Account (EOA) verification process.
nameAlgorithm
3) Layer-3 (Cloud Layer)
This layer is responsible for secure data storage and access using the group signature mechanism.
As there is no centralized organization to maintain data, all transactions in the system are open and
transparent to each node. The user anonymity is provided by generating addresses from the hashed
Algorithm 1 : Smart Contract for SalesProduct
1: procedure I NPUT: P RODUCT DETAILS WITH USER IDENTITY AND A DDRESS
2: OUTPUT: T ransactionId(TI D)
3:
4: Contract
5: SalesP roduct { StructP roduct {PI D, PN ame, Inv, P r}
7:
6:
8: StructCustomer {CI D, CN ame, CA ddr, CM Id}
10:
9: StructOrder {OI D, Ol ist, Qtr, OP ay}
11: function (a)ddP roduct {PI D, PN ame, PP rice, PI nv}
12: IF (P roductSender) = = Supplier, THEN
13: A DD P RODUCT D ETAILS TO P RODUCT S ALES R ECORD
14: ELSE
15: REMOVE IT
Update Product Records
16: if (SupplierI D) = = true, then
17: if PI D = = true, then
18: Update details of pro
19: else
20: remove it
21: END

value of the public key so that the IP address of the entity is not revealed. Ring signature ensures the
complete anonymity of the user to prevent privacy leakage. The ring signature model is constructed
using the following phases:
• Setup phase The initial parameters are large prime no P, a public group G, hash function 1(), 2()
are established where H1 : {0, 1} → Fq∗ where Fq is the finite field of integer of q number of the
element.H2 : {0, 1}∗ × G1 → Zq∗ . The output parameters are (G1 , q, e, P,2 ,1 ).
• Key Generation Phase: P Un , P Rn : User Un (1 ≤ n ≤ k) are in the blockchain network. The user
of the blockchain selects sigmaϵZq∗ . This acts as the user’s private key and computes the public key
P RkϵG equal to σ ∗ P . Now, these keys help to generate the group signature with the help of two
functions, Sign () and verif y ().
• Signing Phase: (Tsig ): In this group signature scheme, a key set is considered, defined by Rn =
P U1 , P U2 , P U3 . . . . . . . . . . . . . . . . . . P Un where the member’s public keys are kept. The requester
chooses a key P Us which isn’t coming from the set where two values are generated as below:
XA , YA , ZA ϵ∗q
If n=s, then
Dn = {(XA + YA ∗ G)} (1)

En = {(XA + YA ∗ H (P Un ))} (2)


Ifn ̸= s
En = (XA ∗ H(P Un )) + (YA + ZA ) ∗ S˘ (3)
Where S˘= P Rn ∗ H(P Un
Participated randomly select rϵZq∗ and calculate Φ = H2 (m ∥ r) where m is the message.
If n=s X
Fn = H1 (Φ, D1 , D2 , D3 ....Dn , E1 , E2 , E3 , ....En ) − Fn (4)
Gn = {(XA + YA ) − Fn ∗ P Rn } (5)
If n ̸= s
Fn = (XA ) ∗ H (P Un ) + (YA + ZA ∗ S˘)
(6)

Gn = (XA + YA ) (7)
Finally, the transaction signature is generated as Tr = (S˘, F1 , F2 , F3 ....Fn , G1 , G2 , G3 ...Gn )
• Verifying Phase: Now, the verification process initiates when anyone verifies the transaction signa-
ture, he must be a participant of the ring signature with all member’s public keys using the following
equations
αn = Gn ∗ G + Fn ∗ P Un
(8)

βn = Gn ∗ H(P Un ) + Fn ∗ S˘ (9)

i
X
(Fn ) = H1 (Φ, α1 , α2 , α3 , ....αn , β1 , β2 , β3 ....βn ) (10)
n=1
After calculating with the αn and βn from equations 8 and 9, the signature value is verified by
equation 10. If the value is matched, then check whether the signature is used or not. If the signature
is not used, then it can be treated as a valid signature, else it is treated as an invalid signature.
5. I MPLEMENTATION AND R ESULTS OF P ROPOSED F RAMEWORK
In this section, the implementation setup with the simulation tools used and the resulted performance for
the proposed model is discussed.

5.1 Experimental setup


To implement our proposed model open source blockchain platform, Ethereum is used. The smart
contracts used here are written in Ethereum using solidity programming language. At client end React user
interface written in javascript is used for building user interface. Then with the help of Web3 library the
React application is turned into a blockchain application. It used Metamask wallet for Ethereum transaction.
For server side deployment and migration of the smart contract Truffel is used. It is a library for testing
and iterration of Ethereum smart contract. For testing of the Ethereum smart contracts at centralized system
local blockchain simulation platform Ganache is used. Whereas for actual simulation of the smart contract
at decentralized platform Test net is used.
For the testing performance of our proposed model, we have conducted experiments using the following
configuration:
• AMD Ryzen 7 (4800H) — Speed: 2.9 GHz (Base) - 4.2 GHz (Max)
• And 16 GB of memory with Windows 10 64-bit
The time it takes for a smart contract transaction to be verified is 38 seconds, and this relies on the gas
price given for the transaction. Depending on the quantity of the data, Algorithm 1 would take 50 seconds.
Unlike Bitcoin, Ethereum does not have a block size restriction but rather a gas limit; the words gas price
and gas limit are described in the preceding sections.
Fig. 3: Ethereum decentralized application framework

Fig. 4: 4 Blockchain Framework Design Using MetaMask and Truffle

5.2 Performance Assessment


Performance of the proposal is assessed in this section. To know how our system will perform in a
real case scenario where various users perform the different functions on the framework. We performed
performance evaluation using Apache JMeter version 5.4.1 and Apache Version 2.4.46.
The product history could be identified through the owner’s data added to smart contracts within each
transaction. The smart contract is updated with the new owner and its state of whether the commodity is
sold or not. The smart contract is publicly available in the blockchain network, and the data is available to
everyone’s user interface for viewing product details, as given in figure 5. The performance of the system

Fig. 5: Product Description


is measured in terms of metrics, gas consumed, execution time, throughput and latency.
• Gas Cost: The gas cost is considered as a combination of execution cost of transactions performed,
which is transaction computational complexity dependent and cost in fetching smart contract codes for
respective transaction to Ethereum blockchain. The gas consumed by different transactions for different
functions present in the smart contract were analysed. The smart contract consists of four different
functions, Add Product(), Update Product Record(), Register Customer() and Buy Product(). Among
these functions it is observed through experiment that with increase in number of products the gas cost
consumed by the Buy Product() function increases more as compared to the other functions. Whereas
the gas consumed by the other function does-not vary much with increase in number of products.
• Average Execution Time: The execution time of a transaction is termed as the actual time taken
by a transaction to execute. It is calculated as the difference in the transaction deployment time and
transaction completion time in blockchain. So for different functions present in the smart contract
various transactions were performed using Apache JMeter tool. It is observed that when one user is
performing transaction for various functions, Add Product(), Update Product(), Register Customer()
and Buy Product() the transaction cost are 16.25 sec, 18.42 sec, 18.27 sec and 22.13 sec respectively.
The average execution time for different transaction increases when the number of users are performing
the transactions while uing the systems.
• Throughput:The throughput of the system is defined as the number of transactions occurring per
second and it is measured in bits/second. for measuring the throughput of the proposed system,
we simulated the transactions for different function in smart contract on JMeter with fixed block
size creation time of around 3 minutes in ethereum blockchain. We observed the throughput with the
variation of number of users performing the transactions, so as to exactly analyze the effect of different
stakeholders of food supply chain performing transactions. It is observed from the experiment that,
with the increase in number of users using the model there is an increase in throughput of the system.

• Latency: It is defined as a delay or difference when one system generates a request and another system
responds to the request. The difference between two actions is called latency. Here we have evaluated
the latency of our proposed framework using JMeter. We simulated the number of users in JMeter,
and the JMeter gives latency in milliseconds.
The following graph, 7, shows our proposed model’s latency and the throughput. The highest recorded
latency in this experiment is 15ms.

6. C ONCLUSION
In this paper, we have introduced a blockchain-based food supply chain system for the agro-food industry.
The blockchain has gained several benefits to grow and move toward a decentralized, trustless environment
and has many advantages in comparison to traditional food supply chain management. We have provided
detailed information on our proposed framework in terms of traceability, trading, and delivery and analysed
the smart contracts’ performance to ensure that our proposed framework is robust and efficient.

D ECLARATION OF C OMPETING I NTEREST


There is no Conflict of Interest.

R EFERENCES
[1] Antonio Arena, Alessio Bianchini, Pericle Perazzo, Carlo Vallati, and Gianluca Dini. Bruschetta: An iot blockchain-based framework
for certifying extra virgin olive oil supply chain. In 2019 IEEE International Conference on Smart Computing (SMARTCOMP), pages
173–179. IEEE, 2019.
[2] Gavina Baralla, Andrea Pinna, and Giacomo Corrias. Ensure traceability in european food supply chain by using a blockchain system.
In 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB), pages 40–47.
IEEE, 2019.
Fig. 6: Throughput of the proposed model

Fig. 7: Latency of the proposed model


[3] BMAL Basnayake and C Rajapakse. A blockchain-based decentralized system to ensure the transparency of organic food supply chain.
In 2019 International Research Conference on Smart Computing and Systems Engineering (SCSE), pages 103–107. IEEE, 2019.
[4] Geetanjali Ramesh Chandra, Iman Ali Liaqat, and Bhoopesh Sharma. Blockchain redefining: The halal food sector. In 2019 Amity
International Conference on Artificial Intelligence (AICAI), pages 349–354. IEEE, 2019.
[5] Hashri Hayati and I Gusti Bagus Baskara Nugraha. Blockchain based traceability system in food supply chain. In 2018 International
Seminar on Research of Information Technology and Intelligent Systems (ISRITI), pages 120–125. IEEE, 2018.
[6] Weigbin Hong, Yefan Cai, Ziru Yu, and Xiangyang Yu. An agri-product traceability system based on iot and blockchain technology. In
2018 1st IEEE International Conference on Hot Information-Centric Networking (HotICN), pages 254–255. IEEE, 2018.
[7] Mark Kim, Brian Hilton, Zach Burks, and Jordan Reyes. Integrating blockchain, smart contract-tokens, and iot to design a food
traceability solution. In 2018 IEEE 9th annual information technology, electronics and mobile communication conference (IEMCON),
pages 335–340. IEEE, 2018.
[8] Nir Kshetri. Blockchain and the economics of food safety. It Professional, 21(3):63–66, 2019.
[9] Qijun Lin, Huaizhen Wang, Xiaofu Pei, and Junyu Wang. Food safety traceability system based on blockchain and EPCIS. IEEE Access,
7:20698–20707, 2019.
[10] Hajar Moudoud, Soumaya Cherkaoui, and Lyes Khoukhi. An iot blockchain architecture using oracles and smart contracts: the use-case
of a food supply chain. In 2019 IEEE 30th Annual International Symposium on Personal, Indoor and Mobile Radio Communications
(PIMRC), pages 1–6. IEEE, 2019.
[11] Khaled Salah, Nishara Nizamuddin, Raja Jayaraman, and Mohammad Omar. Blockchain-based soybean traceability in agricultural supply
chain. Ieee Access, 7:73295–73305, 2019.
[12] Affaf Shahid, Ahmad Almogren, Nadeem Javaid, Fahad Ahmad Al-Zahrani, Mansour Zuair, and Masoom Alam. Blockchain-based
agri-food supply chain: A complete solution. Ieee Access, 8:69230–69243, 2020.
[13] Qi Tao, Xiaohui Cui, Xiaofang Huang, Angella M Leigh, and Hehe Gu. Food safety supervision system based on hierarchical multi-
domain blockchain network. IEEE access, 7:51817–51826, 2019.
[14] Yung Po Tsang, King Lun Choy, Chun Ho Wu, George To Sum Ho, and Hoi Yan Lam. Blockchain-driven iot for food traceability with
an integrated consensus mechanism. IEEE access, 7:129000–129017, 2019.
[15] Arshdeep Bahga and Vijay K Madisetti. Blockchain platform for industrial internet of things. Journal of Software Engineering and
Applications, 9(10):533–546, 2016.
[16] Shanshan Zhao, Shancang Li, and Yufeng Yao. Blockchain enabled industrial internet of things technology. IEEE Transactions on
Computational Social Systems, 6(6):1442–1453, 2019.
[17] William J Gordon and Christian Catalini. Blockchain technology for healthcare: facilitating the transition to patient-driven interoperability.
Computational and structural biotechnology journal, 16:224–230, 2018.
[18] Fei-Yue Wang, Yong Yuan, Jun Zhang, Rui Qin, and Michael H Smith. Blockchainized internet of minds: A new opportunity for
cyber–physical–social systems. IEEE Transactions on Computational Social Systems, 5(4):897–906, 2018.
[19] R Naidu and A Irrera. Nestle, Unilever, Tyson and others team with IBM on blockchain, 2017.
[20] Mayra Samaniego and Ralph Deters. Internet of smart things-iost: Using blockchain and clips to make things autonomous. In 2017
IEEE international conference on cognitive computing (ICCC), pages 9–16. IEEE, 2017.
[21] Jaysing Bhosale and Sushil Mavale. Volatility of select crypto-currencies: A comparison of bitcoin, ethereum and litecoin. Annu. Res.
J. SCMS, Pune, 6, 2018.
[22] Davi Alves. Proof-of-concept (poc) of restaurant’s food requests in the lisk blockchain/sidechain. In Journal of Physics: Conference
Series, volume 1828, page 012110. IOP Publishing, 2021.
[23] Arati Baliga, I Subhod, Pandurang Kamat, and Siddhartha Chatterjee. Performance evaluation of the quorum blockchain platform. arXiv
preprint arXiv:1809.03421, 2018.
[24] Qijun Lin, Huaizhen Wang, Xiaofu Pei, and Junyu Wang. Food safety traceability system based on blockchain and epcis. IEEE access,
7:20698–20707, 2019.
[25] Qi Tao, Xiaohui Cui, Xiaofang Huang, Angella M Leigh, and Hehe Gu. Food safety supervision system based on hierarchical multi-
domain blockchain network. IEEE access, 7:51817–51826, 2019.
[26] Hongliang Li, B Zhang, L Zhang, Y Xue, Miao He, and C Ren. A food traceability framework for dairy and other low-margin products.
IBM Journal of Research and Development, 60(5/6):10–1, 2016.
[27] Zhang Yiying, Ruan Yuanlong, Liu Fei, Shang Jing, and Liu Song. Research on meat food traceability system based on rfid technology.
In 2019 IEEE 3rd Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), pages 2172–2175.
IEEE, 2019.
[28] Feng Tian. A supply chain traceability system for food safety based on haccp, blockchain & internet of things. In 2017 International
conference on service systems and service management, pages 1–6. IEEE, 2017.
[29] J Hao, Yan Sun, and Hong Luo. A safe and efficient storage scheme based on blockchain and ipfs for agricultural products tracking.
Journal of Computers, 29(6):158–167, 2018.
[30] Shangping Wang, Dongyi Li, Yaling Zhang, and Juanjuan Chen. Smart contract-based product traceability system in the supply chain
scenario. IEEE Access, 7:115122–115133, 2019.
[31] Saikat Mondal, Kanishka P Wijewardena, Saranraj Karuppuswami, Nitya Kriti, Deepak Kumar, and Premjeet Chahal. Blockchain inspired
rfid-based information architecture for food supply chain. IEEE Internet of Things Journal, 6(3):5803–5813, 2019.
[32] Ilhaam A Omar, Raja Jayaraman, Khaled Salah, Mazin Debe, and Mohammed Omar. Enhancing vendor managed inventory supply
chain operations using blockchain smart contracts. IEEE Access, 8:182704–182719, 2020.
[33] Shichang Xuan, Li Zheng, Ilyong Chung, Wei Wang, Dapeng Man, Xiaojiang Du, Wu Yang, and Mohsen Guizani. An incentive
mechanism for data sharing based on blockchain with smart contracts. Computers & Electrical Engineering, 83:106587, 2020.
[34] Shichang Xuan, Li Zheng, Ilyong Chung, Wei Wang, Dapeng Man, Xiaojiang Du, Wu Yang, and Mohsen Guizani. An incentive
mechanism for data sharing based on blockchain with smart contracts. Computers & Electrical Engineering, 83:106587, 2020.
[35] Affaf Shahid, Ahmad Almogren, Nadeem Javaid, Fahad Ahmad Al-Zahrani, Mansour Zuair, and Masoom Alam. Blockchain-based
agri-food supply chain: A complete solution. Ieee Access, 8:69230–69243, 2020.
[36] Shangping Wang, Yinglong Zhang, and Yaling Zhang. A blockchain-based framework for data sharing with fine-grained access control
in decentralized storage systems. Ieee Access, 6:38437–38450, 2018.

You might also like