## 3 Prototype Description and Implementation
### Prototyping of Software Components
#### 3.4.4 Blockchain Prototyping  
Lastly, blockchain was also included in the development of the solution, as another layer that would provide additional security and decentralization in information treatment. There are several reasons that justify adding blockchain to the development that is presented here:  
1. It can be used for transparency in data for any required third-party assessment. The data collected by the UAV will be formatted so that they can be placed in a string of characters with any other piece of useful content that do not have multimedia capabilities, such as timestamps. As far as the development works shown here are concerned, images were formatted to Base64 so they could be included as characters. This image formatting is reversible, so images can be formatted back to their original data format if required. 2. It can store several kinds of multimedia information. As for the implementation works included here, images have been formatted to be included in the blockchain, but there is no reason not to include other multimedia information, such as video recordings. The underlying IPFS infrastructure can be used to share them as if it was any other kind of data, and so do all the other lower communication layers. 3. If used in the way is put forward in this proposal, blockchain does not demand a large quantity of resources, neither for energy nor storage. In the system that is proposed here, every block in the custom-made blockchain is used to store a single piece of information collected by the UAV. However, these blocks are shared as JSON files by means of the underlying IPFS network, rather than using any public blockchain platform or crypto-enabled network (such as Ethereum), so they do not require any gas for data transfers among the nodes. No funds or any kind of money is used in this system proposal to be transferred either, so money transfers do not need to be taken into consideration. Validation of the blockchain is done locally considering all the previously added content, as each of the IPFS nodes works as a blockchain node as well. 4. Due to the features previously mentioned, blockchain can be used as a support for good practices certification. As explained before and depending on the requirements from each institution, the information stored in blockchain can be used to prove that cattle is grazing in areas with good access for grass and water, along with any other visible feature in the animals themselves. Typical features of blockchain prevent an effective way of tampering with the information and, should it be tried, it would become rapidly noticeable due to the properties of the hash function used for block summary. In a more specific way, blockchain provides distribution (there is no central authority making decisions; the most important operations in the blockchain-validation of the transactions taking place and creation of new blocks containing such transactions- are performed by the nodes participating in the system), redundancy (the exact same information is available for all the nodes that participate in the system, except for the very first moment that a new block containing transactions is spread among the participant nodes), transparency (widespread availability of the data for every node makes it very difficult to hide away information), immutability (once transactions have been included in the blockchain there is no way to pull them back, event if any kind of mistake is made in the data destination) and consensus (an algorithm is used to define what algorithm is used to define what kind of way will be use to agree on what is regarded as the truth). In the context of this proposed deployment, blockchain has been used to provide the features typical of it to the information that is collected by means of the following actions:  
1. Distribution has been made possible with the underlying IPFS data networking system, which can be used to share any file related to the transactions stored in the blockchain. 2.