Proof of Transaction (PoTx) Based Traceability System for an Agriculture Supply Chain

Tracing the origin of the product in the agriculture supply chain offers food safety, identifying the root cause of the food hazard if any, information connectivity between the participating stakeholders and to achieve customer trust. Blockchain is a distributed ledger technology whose transactions can be recorded in a decentralised and immutable ledger. Several applications were developed in the last few years for blockchain based - traceability systems. Most of the work concentrated on information retrieval and system scalability. Still, promising research has not been seen for a blockchain traceability system with user identification methods. This work presents a blockchain system with user identification and access control mechanisms to fill the gap for each supply chain participant. In addition, the system also proposes a novel Proof of Transaction (PoTx) consensus algorithm designed to achieve scalability with reduced communication overhead and computation power. A novel PoTx algorithm is developed by choosing a random validator from a consensus group based on the transaction count to enforce the fault-tolerance of the system. The proposed system with user identification method allows to prevent and identify product adulteration while tracing the agriculture product.


I. INTRODUCTION
As agriculture is the back bone of many developing countries, improving food productions and monitoring logistics are still a major concern to ensure food safety. But in recent years particularly after the pandemic, India has witnessed increased counterfeiting activities, around 1 lakh crore hole has been created in the economy. Lack of traceability solutions in Indian agriculture supply chain may be one of the causes for illegal activities like adulteration which may lead to serious health hazards. This situation calls for more technological and secured solutions in the agriculture sector.
The major problem behind the supply chain is the involvement of various middlemen or stakeholders. The main drawbacks in an agriculture supply chain are the monitoring and administration of participants activities, information connectivity and in difficulty to identify the product origin. It may leave to a question on the quality and safety of the The associate editor coordinating the review of this manuscript and approving it for publication was Dr. Mueen Uddin . product. Therefore, the key functions of agriculture quality and safety administration must include traceability solutions and prevention of contaminating agriculture products along the supply chain.
For the above requirements, the traditional way of traceable applications gathers information and stores it in a centralized model which is maintained by an enterprise/government centre may not be feasible. Also, there are not many traceability solutions available to trace the origin of the product. This kind of centralized and retailer-oriented traceability solution may be faulty due to the possibilities of data alteration happen in between the retailing enterprises. The demand in the current supply chain situation is to adopt a transparent, secured and supporting traceability solution with advanced technological potential. The demand at the current supply chain situation is to adopt a transparent, secured and supporting traceability solution with advanced technological potential.
Blockchain is a distributed ledger technology with all transactions are being recorded [1]. Blockchain provides traceability and anti-counterfeiting solutions to the problems  With the desirable characteristics such as decentralization and immutable data records, it doesn't require any third party to authenticate/regulate the supply chain flow. If needed, government monitoring and regulatory agencies can also be included in the blockchain supply chain network [2]. The agriculture supply chain is a complex sector as it contains numerous participants who carry out various activities such as transferring agriculture goods, product related information and their financial transactions. the typical structure of a supply chain is shown in figure 2. Also, there are various middlemen involved in the supply chain such as wholesalers, distributors, and retailers to deliver a product from the producer to the consumer. Tracing the origin of products through all these stages is a tedious task due to the lack of information continuity between the participants. In addition, user identification along the supply chain is also a necessary thing to locate the stakeholders in case of any malpractices. Information such as how products are identified and how participants are authenticated will be added to the distributed ledgers. With such an infrastructure, the supply chain can make its information be shared, tamper-proofed and traceable to all the stakeholders in an authenticated way. The potential benefits of blockchain in the agriculture supply chain lie in its decentralised feature. Despite the various stages that exist, the stakeholders can be connected through a transparent peer -to -peer network to reduce counterfeiting and higher transaction costs [3].
The main purpose of the work is to explore how blockchain can be applied to an agriculture supply chain to ensure product provenance, information transparency, prevention of false information and product adulteration. By leveraging features of blockchain such as distributed ledger, cryptographic hashing, and timestamped records, a blockchain based traceability solution for the agriculture supply chain has been proposed and deployed here. The methods of stakeholder registration, information collection of a product, its storage and product information traceability have been described further. To test the proposed method, a blockchain traceability framework using python has been developed and tested the performance of this system. This study contains the following main contributions: 1. To study and identify the drawbacks of current supply chain traceability systems.
2. To propose the blockchain based agriculture traceability system with the architecture design, narration with a demonstration.
3. To deploy the traceability process for product information storage and retrieval, provenance tracking, and user authentication.
4. To simulate the proposed method and to test the system's feasibility in terms of performance and security.
It is also important to mention the challenges faced while designing this blockchain framework. One of the problems found was sharing of transaction data between network participants. Though blockchain consensus algorithm gives a solution for this, proposing the right algorithm was quite challenging to overcome challenges such as computation complexity and network congestion. In addition, mining a new block to a network had created a problem and taken time as the number of users and transactions increases.
The organization of the article is designed in a way where Section II discusses the related work on supply chain traceability systems and their methods. Section III provides a novel method for the blockchain based traceability system for provenance tracking and anti-counterfeiting. Section IV discusses the simulation method and discusses the obtained results. Section V evaluates the performance of the proposed method and this study finally ends with a conclusion of section VI.

II. LITERATURE SURVEY
This section intends to review the recent works conducted in blockchain technology-based traceability systems with the methods and materials utilized for designing these traceability systems. In recent years, blockchain technology has emerged as a giant and hoping to apply in almost all domains. Initially, the research on blockchain was found in the financial and banking sectors. Later on, blockchain started to gain attention in supply chain traceability systems. Blockchain provides a possible solution to traceability systems by its chain of hashing features maintaining security and data immutability. Blockchain enabled traceability system ensures transparency and visibility, real time data collection, preventing adulteration, quality control and monitoring [4]. Traceability in the supply chain performs a dual role. The sourcing of relevant product data, its processing procedure and product related information is to be updated by effectively communicating with the participants involved in the supply chain [5]. The studies ensure the blockchain can deliberately satisfy supply chain necessities and address the inadequacies of traditional traceability systems [6], [7], [8].
Blockchain traceability has been applied in various domains like healthcare, business processes, IoT, privacy, supply chain and data management [9]. The various domain applications of blockchain technology have been studied systematically [10]. A traceability framework for supply chain using blockchain for the Textile & Clothing (T&C) industry has been studied through the mass balancing validation mechanism [11]. The various performance metrics have been tested by demonstrating the application in the organic cotton industry. The recent activities and research initiatives of blockchain in the energy sector had been discussed. The challenges faced in the energy sector are identified and the current blockchain pilot projects and start-ups are elaborated. The author concludes that most of the works are in the early development phase and need to improve on scalability, decentralization and security [12]. Zhu et al. [13] focused to assure the transparency of medicine supply chains by leveraging blockchain features. They utilized Ethereum smart contracts to design and structure a medicine traceability system and tested the proposed method to render high level of security and privacy. The consensus mechanism has been improved with a point accumulation-based mechanism and an access control policy has been designed using smart contracts to prevent the alteration of medicine.
Much researches have been carried out in recent times in the food and agriculture sectors because data management is a necessary component in agri-food sectors. The product data determines the characteristics and quality of the product to guarantees food safety and sustainability [14]. The food traceability system has ensured the collection of real time data, by transferring it to demonstrate the building process. But the traceability system needs to be optimized for many uncertain reasons in future research [15]. The author has proposed a scalable blockchain framework for provenance tracking in supply chain systems. They proposed a permissioned blockchain framework, including government and regulatory agencies. The work ensured the traceability of data to consumers by utilising a three-tier architecture [16].
The blockchain and IoT based food traceability system has been proposed with a Another research work proposed a framework called AgriBlockIoT which is a fully decentralized network. The system was able to integrate IoT devices to produce and consume the digital data along the blockchain ledger. A classical use-case was proposed called from-farmto-fork within the given vertical domain. The two blockchain platforms namely Ethereum and Hyperledger Sawtooth have been utilised to deploy traceable system performances [17]. The performance was analysed with regard to network latency, CPU time, and network usage. This paper has also highlighted the main pros and cons of both implementations. Similar traceability systems were found for soybean [18], wine supply chain [19] and rice supply chain [20]. The tracking system for food safety based on blockchain and EPC information service networks was discussed [21]. The paper utilised both on-chain record and off-chain collaborative data to reduce the amount of single node data and the data explosion problem was eased. The traditional transactional records were replaced by smart contracts to manage food related data protecting corporate privacy. The existing distributed traceability system using EPCIS is scalable both within and across enterprises. But still there exists a data tampering risk which is to be solved by blockchain. A traceability system for fruits and vegetables was implemented to improve the efficiency of query transactions in a database using blockchain. They propose solutions to the problems such as heavy data load, slow query speed, and privacy data protection on the existing systems [22]. The solutions provided include avoiding data load, query speed enquiry and data privacy for existing systems.
The smart contract-based product traceability system shows the transaction histories which are recorded in an unaltered ledger [23]. The process of the supply chain such as product registration, transferring and product tracking was realized through smart contracts. Consumers can join the network as full nodes or lightweight nodes. An event response mechanism is designed to identify the transaction of both parties. Kui Gao et al developed a traceability system for the food supply chain based on Hyperledger fabric was analysed [24]. The system was implemented on the base of the Hyperledger fabric platform. The effectiveness and superiority of Food Supply Chain Traceability System (FSCTS) are proved by conducting extensive comparison experiments with some similar traceability systems.
The system used blockchain technology to remove the centralized structure and any intermediaries [25]. The information exchanged at every stage through blockchain hash has optimized the system's performance. The communication and transactions inside the supply chain completely depend on smart contracts for all the stakeholders. The system utilized an interplanetary file system as an off-chain database. The system has designed an application based on Ethereum and smart contracts in which they defined the supply chain participants role. A controller has been assigned between VOLUME 11, 2023 the client user and an Ethereum that schedules and orders the transactions. Based on the literature, they adopted Istanbul Byzantine Fault-Tolerant (IBFT) algorithm to verify and validate transactions. The major attributes in this system are universal product ID and the date of purchase. Most of the traceability systems face a major problem of scalability issue. Scalability is a long-term issue in the blockchain. Any application developed needs a scalability feature in order to regenerate that technique in the future. Since blockchain has many features to adopt for traceability systems, it has the major drawbacks in achieving scalability. The scalability of the blockchain system is affected by its two major factors such as throughput and latency which needs to modify the existing process of block generation and block data structure. These things are recorded in a research work named zyconchain [26]. For this, zyconchain creates three blocks based on three different consensus algorithms. The three blocks are the parent block, side block and state block. Side block carries transactions at a high rate. It is generated by zyzyva algorithm. Miners now pack side blocks into a parent block to reduce final consensus complexity per transaction. To scale out the system with an increasing number of nodes, it has used the shard technique. Scalability issues contain three problems such as throughput, cost and capacity. These are analyzed by considering techniques such as on-chain, off-chain, sidechain, child-chain and inter-chain [27]. In blockchain systems, transparency and efficiency are contrast things and it is difficult to achieve them simultaneously [28]. The management of supply chain operations includes a lot of costs, efforts and time consuming [29], [30], [31], [32], [33], [34].
The blockchain optimization methods for consensus algorithms and smart contract methods are discussed in table 1 comparing its pros and cons.
In addition, a large number of studies in recent years are being conducted on blockchain technology in traceability systems particularly in agriculture and food supply chain. However, most of the works lack practicality. Also, most traceable systems are designed either as public using Ethereum or Private using Hyperledger fabric. The scope for designing the traceability system according to the use case requirement is less in these environments. For the agriculture supply chain, the consortium based blockchain systems will be more adaptable since the level of privacy and decentralization in these systems lies between public and private blockchain platforms. Consensus plays a major role in blockchain systems, for choosing an appropriate consensus that is suitable for the agriculture supply chain. In summary, blockchain obtains major attention due to its technical characteristics such as transparency, decentralization, immutability and data security that can possibly be suitable to adopt in the supply chain scenarios.

III. METHODOLOGY
In this section, the solution for agriculture product traceability and anti-counterfeiting has been described. The system can trace the origin and also traceability information throughout the supply chain involving all the stakeholders from the production to consumption stage. The technical contributions of this work are as follows.
The system proposes a novel Proof of transaction algorithm which is an optimized method of PBFT algorithm. In addition, there is a user identification method designed to check eKYC of every participant who wishes to enroll into this permissioned and trusted network. Also, the smart contracts algorithm checks the roles of each user, defines the access control policies, checks payment details and product details in order to confirm the product transaction.

A. CHOOSING THE BLOCKCHAIN PLATFORM
The traceability framework designed in this work is intended to provide the source and the production process at each stage of the supply chain. Since the financial and legal product information is handled here, privacy has to be assured. Therefore, blockchain plays a vital role and make sure the security of this system through its cryptographic hash algorithms. Blockchain consists of three types such as public, private and consortium models. In a public blockchain platform like bitcoin, complete decentralization is achieved along with extra security due to the complex Proof of Work algorithm. But it lacks the system scalability as the number of node transactions increases. The second type of blockchains are private and permissioned that operates within an enterprise or across enterprises like Hyperledger fabric. It allows only the known identities into the network for making transactions. Though the system performs well with these blockchain platforms, decentralization cannot be achieved much as there will be a central controlling authority for an enterprise. Consortium blockchains are one that stands between public and private types. Different applications use different blockchain platforms depending on their use case need. Also, it is learned that one blockchain architecture cannot be suitable for all the use cases. The performance of the system lies in the blockchain architecture along with the consensus algorithm suitable for the development environment.
The proposed method employs a consortium based (hybrid blockchain model) using open-source python coding which allows anyone to join the network with a pre-condition of KYC (Know Your Customer) verification. Also, in the proposed model, the control authority keeps changing based on their higher transactional count to validate the transactions which allow to scale well and be fault tolerant. Table 2 shows the feature comparison of three types of blockchain platforms.

B. NEED FOR AUTHENTICATION MODULE
Blockchain systems are self-authenticated by verifying the users' public-private addresses and the digital signature of the transaction. This model can be applied to open and public access blockchain networks with complex consensus algorithms designed. But in the supply chain scenario, the need for complex consensus algorithms is unnecessary and the system also should scale well to handle the ever-growing supply chain transactions.
Hence, an authentication module is emphasised in this traceability system in order to cross check the authentication of the owner in case of product quality and anti-counterfeiting concerns. As this system uses blockchain as a base layer, the cryptographic hashing techniques are the same as the conventional bitcoin blockchain systems. User needs to register themselves with their personnel details like mailid, mobile number, aadhar number and their location. This confidential information will be hashed and stored in the local database. Then these hash values will be appended to the block header. This method can reduce the storage burden of saving authentication information into the blockchain ledger. These data will be generated only when there is a quality and safety issue raised by a customer. Figure 3 shows the flow of the authentication module. The system requires user identity information while registering onto the blockchain system. The hashed values will be stored securely in the blockchain ledger.

C. PARTICIPATING ENTITIES
In an agriculture supply chain system, there will be various stakeholders exists to transmit a product from the production stage to the consumption stage. The involvement of a lot of middlemen is also a cause for low efficiency in the agriculture supply chain. Hence blockchain systems are trying hard to decrease the unnecessary involvement of middlemen to reduce transaction costs. The registered stakeholders will be assigned a unique participant_ID. The role of a traceability system is to encrypt and upload the hashed and timestamped data into the blockchain ledger. Also, the system will create a digital signature for all the transactions made. The condition for each transaction and for each stakeholder is supported by smart contract algorithm. The functions and modifiers to carry out an event is shown in table 3. The various stakeholders involved in the supply chain system are illustrated in detail: 1. Producers: Producers are the key players in the agriculture supply chain. They are responsible for sourcing the seedlings/raw materials from the manufacturer. They produce the crop and sell it to the processor (in the case of paddy, wheat, etc.) or distributor. The producers must disclose the following information in the blockchain records. a. Unique_productid b. Location c. Quantity_dispatched 2. Processors: Certain crops like paddy and wheat needs to be processed before consumption. Such crops will be transferred from the producer to a nearby mill processor and it takes some weeks to months to finish the process (for example: from paddy to rice). Processors receive the product and verify the information recorded in the ledger. They need to store the following information in the ledger.  d. Quantity_processed e. Location 3. Distributors: The distributor's role is to buy from the producer or processor and send it to the consumer directly without the involvement of the multi-tier wholesalers and retailers. Hence, they need to carry over the roles of storing and delivering in some cases. The distributor's primary function is to sell the correct product to consumers to meet their requirements. The following information will be added by the distributor into the ledger.
f. Location g. Quantity_delivered 4. Consumers: Consumers are the motivation of the economy and the country. In recent generations, if a consumer VOLUME 11, 2023 Algorithm 1 Consensus Activity Input: member nodes, consensus 1. Member nodes present in the network and view the network transactions 2. Consensus nodes make and read transactions, involve in consensus voting process 3. Consensus group will be formed comprising consensus nodes 4. Select one validator node from the consensus group 5. If the validator not responds, apply round robin algorithm to consensus group and select next validator node. 6. Validator checks the transaction validity 7. If transaction==true then broadcast the validated transaction to all network nodes 8. Else 9. Discard the transaction 10. Repeat step 4 based on more transactions wish to buy a product, they start to collect information about the product first before buying it. The extracted information lets them decide on a product from a particular distribution network. Hence, blockchain based encrypted data holding products will definitely be trustable and traceable to them which can increase interest to buy from this secured supply chain network. In case, any counterfeit or information mismatch exists in the product, the consumer can trace back the entire supply chain of a particular product with the use of a product_ID. The participant's nodes hold the root hash of all the product traceable information in their local system. It will trace back and generate the required product traceable information from the blockchain's distributed ledger.

D. CONSENSUS ALGORITHM
Consensus is the core component in blockchain technology that is responsible for generating new blocks and guaranteed ordering of transactions into the blocks. These algorithms are used in distributed computers where interconnected nodes need to interact and agree with each other for a common purpose. In a bitcoin blockchain, a block can be generated by some nodes (miners here) and it holds the number of transactions in it. The next important step for the generated block/transactions is to be accepted by the member nodes by following a process called ''reaching consensus''. Once the block/transactions are accepted by fellow members they will be linked to the ongoing chain by hashing it cryptographically.
Popular blockchain applications like bitcoin and Ethereum uses the Proof of Work (PoW) consensus algorithm. As PoW requires huge energy consumption and hardware resources to validate a transaction. Ethereum is likely to move to Proof of Stake consensus in near future. Consensus algorithms can be classified as a lottery based and voting based consensus algorithms [32], [33]. Lottery based algorithms require to solve a cryptographic puzzle to validate a transaction like PoW.  On the contrary, voting based algorithms use multi-phase prepare commit messages that may increase message traffic and communication cost hence decreasing scalability. Different consensus provides different functionalities. Lottery based algorithms can scale well with the increase in the number of nodes and transactions but it takes time to achieve finality. On the other hand, voting based algorithms achieve finality soon but do not scale well when the number of network nodes increases. Hence, a customized consensus algorithm is required for the applications based on their use cases and requirements [34].
On a common note, it is learned that permissioned platforms may require voting-based algorithms as there will be a trusted member nodes existing in them.

1) PROOF OF TRANSACTION (PoTx) CONSENSUS MECHANISM
This work proposes a novel voting-based algorithm 'PoTx' abbreviated as Proof of Transaction which gathers votes based on the number of transactions made by the node in the network. The nodes to achieve consensus are decided by the number of transactions made by that particular node. This method can reduce the consensus making nodes to improve the blockchain efficiency.

2) NODE TYPES
Nodes are categorised as member nodes and consensus nodes. Consensus nodes have read and write access to the block transactions which means they make transactions and involve in the voting. Similar to PoS, where nodes can be grouped based on their 'transactions' recorded in the network. Nodes with higher transactions will be categorised as a consensus group.

3) CONSENSUS NODES
Consider there are N number of nodes present in the network and C are the consensus nodes eligible to participate in consensus voting.
where d is the percentage of nodes exist in the network. consensus nodes receive transactions, involve in voting and saves the current state of the product in its ledger.

4) MEMBER NODES
Member nodes that are present in the network can view the transactions but not perform consensus voting to choose a validator node. Hence the member nodes are defined by N -C.

5) VALIDATOR NODE
Among the group members, one validator node will be chosen by using the round robin mechanism to validate a transaction. If a selected validator node cannot respond to validate the transaction within the set time limit, the next node will be chosen again as a validator node to validate the transaction and a block. Hence, the block validating option will be assigned nearly to all the nodes present in the consensus group. The flow chart for a novel Proof of Transaction (PoTx) is depicted in figure 4. The working procedure of the proposed consensus algorithm is shown in algorithm 1.

E. NETWORK COMMUNICATION MODEL
In this system, each stakeholder is considered a computer node and the network consists of n number of peer nodes distributed across the globe. Hence all the transactions should be available to all the network nodes even if some nodes fail or behave maliciously. This can be ensured by the consensus algorithms taken and the moto of consensus algorithm is to make and preserve the shared state in an immutable distributed ledger. In this blockchain based supply chain network, each user needs to register themselves to make product transactions. The system will generate the unique id for each registered user to identify themselves along the supply chain. Similarly, each product will also be registered with a unique product_ID. As this system follows the conventional blockchain method, the system will generate the public-private key pairs for the users after registration. This public private key pair is similar to a username and password. The key pair provided needs to be stored internally within the user's system safely in order to make future  transactions. The public key is visible to other stakeholders in the network through which the transactions can be done. The private key is like a password, one needs to keep it secret. Once the user got the key pair, the sender can make product transactions with their public and private key and with the receiver's public key. The public and private key pairs are generated using the hash function SHA256. In order to make a product transaction, the system requires the sender's public and private keys and the receiver's public key. In this system, the distributed ledger stores the agriculture product information such as product-ID, quantity, dispatch_ID, and location depending upon the supply chain stakeholder. A transaction signature will be generated with the help of SHA256 based on public private key pairs. On successful completion, the transaction will be added to the node transaction list.
Though the transaction has not been mined yet at this stage, the transaction will only be visible to the current node which is shown in figure 5. In order to make it decentralised, consensus comes in place to make the transaction record stored decentralised across the supply chain network. According to the novel consensus method, the validator node verifies and  validates the transaction and adds it to the ledger state. The validator node will be selected randomly from the consensus group of nodes. The current transaction state will be updated for all other network nodes.

F. SYSTEM STORAGE
There are various ways of storing sensitive data in a blockchain system in recent days. They are on-chain data, off-chain data, double chain storage, etc. Each method possesses both advantages and disadvantages depending on their system needs. This proposed system uses the local devices VOLUME 11, 2023  to store the identity management data such as hashed KYC details of system participants. The ledger data such as sender, receiver, transactions, product quantity, and time will be saved as on chain storage data. These data will be distributed and available among all the nodes. Saving data in a local device can ease the storage burden of the blockchain traceability system.

IV. THE ALGORITHMS FOR THE PROPOSED SOLUTION
This section contains algorithms for the implementation of agriculture product traceability system using blockchain technology (shown in Algorithms 2 to 11). The blockchain program is written using python 3.7+ with a flask framework (python web framework) installed on windows 10. The Processor is Intel(R) Core (TM) i5-1035G1 CPU @ 1.00GHz 1.19 GHz with 16GB RAM. The traceability system is designed in such a way that supply chain partners are connected through a single channel. The key feature of using this traceability system is to provide immutable timestamped transactional records to the supply chain stakeholders/ system nodes. All the transactional records will be stored in distributed database and the participant's KYC data hash will be stored in a local database. At the initial stage, all stakeholders need to register themselves with their name, aadhar number, emailid, mobile number, Kisan card number (optional) into the system which is given in algorithm 2.
The system checks their mobile number and email validation with OTP sent to their respective mobile and email id that is shown in the Figure 7. After verifying their details, the system will generate a unique_ID for the stakeholders. the user can then procced to make a transaction with the generated public private key pairs that is shown in figure 8. As the system is consortium based, user validation enables reliable transactions by the trusted participants within the network. There will be four types of participants included in the system. They are Producers (Farmers), Processors, Distributors and Consumers. The product will be transmitted from a producer to consumer through processor and retailer which is discussed in Algorithms 3 to 5. At first, the genesis block will be created by the Producer node and the role of the Producer is to grow quality crops.
The deployment of smart contract algorithm shown in figure 9 regulates the flow of product supply between various participants in the network. To add appropriate crop details into the blockchain ledger while physically transferring their product to the registered processor/distributor. The product will be transferred to the processor once the payment is successful to the Producer by the processor. Figures 10 and 11 shows that assignment of each participant's role and it is mapped with their public key for tracing them along the supply chain. The creation of a new block that occurred by this transaction will be notified to all other network nodes/participants in the supply chain by following a Proof of Transaction (PoTx) consensus protocol.
According to this protocol, the validator node selected from the group holding the maximum transactions in the network verifies the current transaction and validates the new block. On the client side, the supply chain participants can verify the state of the product and the owner of the product by querying with the public key and the Unique_ID of the product.

V. PERFORMANCE ANALYSIS
To reduce complexities, the blockchain system ran its simulation on a single system with multiple nodes created with different ports as different participants. Because it is difficult to simulate and evaluate the performance of a blockchain system with a large testbed incorporating channel structure and many features.
The proposed work first executes the authentication module as it intends to verify and store the KYC details of the supply chain participants. The module requires basic details of a participant along with their email and mobile number verification. Once verified the participants are provided with the public and private key pairs and considered registered participants within the blockchain network. This authentication module ensures trust and security among fellow participants. As conventional consensus like PoW and PoS requires high energy, computation power and more stakes to validate transactions, the proposed system follows a novel PoTx consensus mechanism that requires comparatively less energy and computation power.
Based on the mathematical model proposed in [40] to find the honest and malicious nodes being 'a' probability of number of honest nodes be 'a' and malicious nodes being 'b'. Then the malicious nodes would control the network be 'n nodes given in equation (2).
This ratio can satisfy the Poisson distribution given in equation (3), Hence the possibility 'p' to attack the network by malicious nodes would be in equation (4) p = lim λ→∞ ∝<w<β If the number of honest and malicious nodes increases, the probability of attack will decrease. Also, the system possesses Peer to peer network transactions. The Proof of Transaction algorithm would decrease the possibility of malicious nodes by choosing the leader node among the consensus in a Round Robin fashion. Therefore, the agriculture traceability information will be stored securely in a blockchain ledger. The comparative analysis of the conventional works such as Proof of Work [41] and PBFT [19] are given in the table 4. The quantitative analysis of the proposed PoTx was analysed with the number of transactions from 100 to 500. The consensus complexity of this work shows 22.9% and 15.6% which is better than PoW and PBFT. The comparative results are given in figure 12. The existing works was designed for agriculture supply chain based on blockchain and it is more relevant to this proposed work.

VI. OPEN PROBLEMS RELATED TO THIS WORK
Although blockchain technology enables digital tracking of agriculture product, complete traceability lies in the combination of both physical and digital product tracking. The proposed work can be enhanced by adding the RFID tags placed on the product label by adding the tag information on the block header.
At present, the maintenance cost of the distributed traceability network is high and financial support is needed to integrate the existing traceability systems with the blockchain technology.

VII. CONCLUSION
Blockchain technology in the agriculture supply chain provides effective and transparent product tracking avoiding unnecessary middlemen in the supply chain path. This emerging technology allows to maintain a global digital ledger for secured tracking. The major problems faced by the agriculture industry such as the information gap between participants, lack of trust among consumers about the product source and unfair payment to the marginal farmers may be resolved by this traceability framework. The work begins by highlighting the supply chain issues in the agriculture sector, then proposed a traceability solution to overcome them. The proposed work has included an authentication model along with a novel consensus algorithm Proof of Transaction (PoTx) to ensure participant's identity management and system efficiency. PoTx works by the concept of maximum transactions count and so it reduces the computation difficulty that happens in Proof of Work systems and network traffic that occurs in PBFT based systems.