Architectural scheme of a multi-blockchain in the Agricultural field

. The blockchain represents structured and shared data. Instantly, it is a modern method of distributed databases controlled by a group of individuals. The goal is to store information, create a digital ledger of data, and dispatch them to each network-independent party. Blockchain technology gets used in many fields like government, transportation, healthcare, etc. This article will focus on the blockchain in the agricultural supply chain, especially the multi-blockchain scheme to enhance efficiency and track products. This kind of scheme requires the existence of two chains at least in one system. The article analyzes previous researches on how implementing this model and cites its various steps. Also, this research will offer a novel theoretical architecture inspired by the previous ones. The novel structure will avoid the errors that exist in previous experiments. This novel theoretical scheme uses sensors to provide us with environmental data. Subsequently, we use the multi-blockchain structure to stock our data in blocks. After that, we build Smart Contracts to control all the transactions and make decisions based on the conditions inside the source code of these automated contracts. This scheme would be more effective than the cloud and the simple blockchain storage.


Introduction
Blockchain is a member of Parallel and Distributed Computing Architecture (PDCA) systems.It focused on a series of nodes that an authority manages and controls.It aims to reduce costs, eliminate third parties and enhance productivity and performance [1].There are three types of blockchains.
• Public blockchains: Such as Bitcoin-Blockchain, open for anyone to participate or consult the transactions.It has an open-source code.
• Permissioned blockchains: like Ripple.However, it is a distributed system but controlled.It may or may not be open source.
• Private blockchains: It is smaller.Their membership is controlled and managed.The participants are trusted members and trade confidential information.The Blockchain is a Peer To Peer Network (P2P system) with no central authority managing data flow.It is a decentralized database that guarantees the integrity of those data.Therefore, all the connected computers receive the instant and the last version of the database.The Structure of Blockchains contains: • The Block: A list of transactions recorded into a ledger over a given period.Each block has its size, period, and triggering event.The blockchain record the block that contains transactions accepted by all the participants of this network.
• The Chain: "chaining" them together is linking one block to another using hashing methods.The hash is the magic that glues blockchains together and allows them to build up mathematical trust.Each block contains the hash of the previous, the content, and the hash of the current block.Also, the hashing is a fingerprint of this data and locks blocks in order and time.We all know we cannot decrypt a hashing method that expresses how much blockchains are a secure technology.
• The Network: It is composed of "full nodes."Each node contains a complete record of all the transactions.In other meaning the last version of the database.One of the biggest reasons why people accept using blockchains is that they have no use for a third party (Banking companies, financial institutions..., Etc) to interference between two nodes.Simultaneously, blockchains produce an honest system.They finish the pursuance of rules across their consensus algorithm.The transaction becomes accepted after the verification and the validation of these full nodes.Blockchains used Smart Contracts.We need to describe more about the meaning of this concept; it is autonomous software coded and build as complex if-then statements.It can self-verify if the conditions got proved or not using methods that can analyze the input data.After that, the smart contracts can self-execute by applying the commands that are inside the program.Blockchain starts to authorize the use of Smart Contracts because it is an independent element that can execute instructions without the interference of a third party, just like the concept of Blockchain [2].

Previous work
"A double-blockchain solution for agricultural sampled data security in Internet of Things network" research confirmed that some malevolent entities could manipulate the device and modify the collected data.Those entities can be hackers, fake data generators, or broken E3S Web of Conferences 297, 01056 (2021) https://doi.org/10.1051/e3sconf/202129701056ICCSRE'2021 equipment.In a healthcare IoT application, a manipulated sensor may reveal mistaken cardiac heart rate measures.This action also may lead to prescription errors.As in agricultural applications, such problems can start the leakages of secrets of the production, crop disasters because of improper control measures.In addition, the manipulated data contribute to the wrong watering time and quantity measurement.The existing blockchain solutions are focused on public chains such as Ethereum or Hyperledger.Unfortunately, public chains like Ethereum do not possess the capabilities to upload and download data in time.On the other hand, the consortium chains solved the deadlines of public chains, but data protection could become a problem.They are not fully decentralized.Combining these technologies will introduce a double-chain solution.
The system structure constitutes two blockchains.
Ethereum is an open public blockchain platform that offers users services like Smart Contract mechanisms.The system has three network layers that correspond to the various data processing phases.IPFS represents the first network.Sampled data got immediately stored in the IPFS Network, and the hash results of the IPFS contents got generated in parallel.Then the hash values of IPFS got uploaded to the second layer ASDC chain.In the ASDC chain, multiple IPFS hash values got stored in each block.The ASDC chain hash result got also measured in every block.At this point, only IPFS hash values are stored in a block, but not files.The ASDC chain thus processes much less data and is easier to manage.Many systems can handle the agricultural field, but each one has a weak spot.For example, using a cloud file storage system can be good for transmitting data but bad for its protection.The Ethereum blockchain system is a protected environment and an anti-tampered system.However, the Ethereum blockchain is slow in uploading and downloading data.The consortium chain has a medium level of security.The transmission speed is all right, but the defense is weak.The Double-chain structure that combines the Ethereum blockchain and the Consortium chain can offer an attractive solution for developing the best scheme because the system will become decentralized, anti-tampered, and completely safe, transferring speed still medium.However, we will get the protection of all recorded data.The security risk faced by this system constitutes the modification of the data hash.The ASDC hash values will increase the security, but they will also lead to redundancy of data.With the agricultural IoT network getting great, more and more things will join the system; the blockchain network will be increasingly pressurized [3].
The article "A hierarchical multi-blockchain for finegrained access to medical data" represents one of the works that can inspire us to apply their architecture model in the agricultural field.The objective of the project is to create an effective health data management system.The research tries to consider different users who may need to read or write data on health, like patients, doctors, and hospital personnel.The scheme utilized is formulated on a multi-blockchain structure.An API allows all users (patients and hospitals) to connect with the system.The Proxy blockchain layer (PBC) acts as a proxy for requests between the users and the blockchain services which process the requests.This layer has other functions as users registering and serves as a distributed transaction logger.All the PBC features got performed through smart contracts and the Proof-of-Stake mechanism.

Fig. 1. Multi-Blockchain structure for the previous work number Two
The system has divided into multiple domains at the Domain Blockchain Layer (DBC).Each group of stakeholders represents a domain of its own.For example, the hospitals participating in this system will operate a Hospital DBC, whereas the medical device manufacturers will run a Manufacturer DBC.The DBCs are subordinate blockchains and cannot communicate directly with the user layer.The PBC pre-processes all requests and transmits each request to the relevant DBC.For example, the Hospital DBC will handle both the request of the patient to access his medical record and the required data encryption/decryption process.Implementing Smart Contracts is responsible for the functionalities performed.The lowest layer is the data layer.Each stakeholder can retain its data in its database domain as long as data got well encrypted.Attribute-Based Encryption (ABE) got utilized to support fine-grained access to the data.Having the ability to encrypt configuration data by a device manufacturer means that access to "the device software update log" can be done only by the hospital technical personnel [4].
The followed research represents the "Multi-blockchain application technology for agricultural products transaction" article.The scheme bellow represents their proposition: Fig. 2. Multi-Blockchain structure for the previous work number Three "The agricultural product transaction information" includes consumer's personal information, intermediary information, suppliers, logistics, finance, information about farm products, and transactions procedure.Certificate Authority (CA) represents the digital certificate.It is the element that verifies the details of user nodes and the Key provider of consensus information in the entire blockchain.User data, transaction data, and agricultural product information data are different data types.The single blockchain scheme may cause several data repetitions, and the information cannot quickly found.The "user information blockchain" principally stores information about consumers, producers, processing companies, distributors, etc., like ID, basic account information, reputation information, etc.The agricultural product information Blockchain contains information about crop growth environment information, reprocessed agricultural manufacturing information, and product stream information [5].
The article "Research on agricultural supply chain system with double chain architecture based on blockchain technology" proposed a public double-blockchain to provide modern management for all the agricultural fields.They mentioned that the blockchain as a service offers the protection needed and improves the utilization of agriculture business resources.Given the protection lack of company information by the public blockchain, the article develops a model of agricultural resource blockchain, based on "User Information Chain" and "Transaction Chain."The "User Information chain" was added for recording the user data, and all transaction data is saved and recorded by the Transaction Chain.The adoption of double-chain models in the public agricultural business field is beneficial.The node in the chain can exploit resources on the public service network without being aware of the company's private information.So technically, it ensures the transparency of transaction data and guarantees the privacy of user information.The User information chain ensures the privacy of the participant's personal information.The transaction chain ensures that the transaction mechanism is transparent.In this work, we must examine some points further.On the public service network, many resources require improvements in all forms of equipment.Also, the mechanism of Proof-of-Stake needs some enhancements in terms of speed and efficiency [6].The first layer is the IoT layer.It is composed of all the necessary sensors and IoT equipment (Arduino, connectors, etc.).The sensors convert a physical quantity into an electrical one.The sensors of humidity, temperature, pressure, acceleration and others will connect with Arduino.Communication can be done between the devices using Bluetooth or a wireless network.The first layer can provide us with trustful data about the environment.The features of Arduino will give us the collected data that will be used later in the other layers.
The blockchain layer is composed of three different blockchains.The first one is the Agri-product information BC.It is full of details about products and collected data.The second BC is the user information BC.It is composed of all the details about users and the participants of the network.The last BC is the transaction information BC.It contained many details like the personal information of users, intermediary information, logistics, finance, information about farm products, and transactions.This model will count on the Smart Contracts.It is a selfexecuting contract controlled by the particular conditions and terms within them.Those Smart Contracts run on software code.Therefore, it will guarantee the accuracy of the decision, transparency, and clear communication between parties.In the security field, automated contracts employ the highest degree of data encryption presently available.The parties commit themselves to obey the rules of the underlying code so that all we may achieve is the guaranteed results.

Conclusion
In this paper, we have presented a list of previous works about the practice of the multi-blockchain scheme in the agricultural field.The first result is that we discover the diversity of those architectural schemes, and every structure has its advantages.The second result is that we got inspired to construct a theoretical architecture based on multi-blockchains.The model consisted of two layers: the IoT layer and the blockchains layer.The use of IoT increases credibility.The use of this type of blockchain layer has better data flexibility and more efficient data retrieval speed.The proposed research has better function expansion capabilities and improved security using the advantages of Smart Contracts.The main goal is implementing this model in reality and testing its performance since the theoretical scheme has maintained a good application prospect.However, multi-blockchain technology got adopted in many other fields, including healthcare, smart cities, markets, government, and transportation.Agri-food Traceability is a very crucial subject, so several smallscale blockchain ventures in many countries got initiated.All have two sides still.For certain people, understanding the concept of blockchain is always a little bit lacking.This problem represents an obstacle to growing up the fame for this technology.Furthermore, certain firms do not want to share with customers some details of the manufacturing supply chain.Yet, there are still many issues and obstacles to be addressed and overcome.

Fig. 1 .
Fig. 1.Double-Blockchain structure for the previous work number One

Fig. 3 .
Fig. 3. Double-Blockchain structure for the previous work number Four