# IoT Blockchain Data Vercity with Data Loss Tolerance
## Appendix A  
```
1: Procedure New-node-joining
2: Input: ARRAY IoT blockchain[n], STRING IoT blockchain-daemon-name, NUMBER IoT blockchain-IP-address, NUMBER
3: port-ID, STRING new-node-address, STRING member-unique-key
4: Output: ARRAY IoT blockchain[n+1]
5: New-node call IoT blockchain-daemon-name, IoT blockchain-IP-address, IoT blockchain-port-number
6: if (administrator permits) then
7: satisfies:
8: node joining successful
9: member-unique-key = unique key returned
10: add capacitance to IoT blockchain[n+1]
11: end
```  
**Algorithm A1**New node joining IoT blockchain P2P network  
```
1: Procedure IoT-store-stream
2: Input: ARRAY IoT-stream-name[n], STRING IoT blockchain-name, STRING transaction, STRING transaction-unique-key
3: Output: ARRAY IoT-stream-name[n+1], STRING transaction-unique-key
4: transformed-IoT-transaction \(\leftarrow\) format(IoT-transaction)
5: if (administrator permits) then
6: ARRAY IoT-stream-name[n] \(\leftarrow\) transformed-IoT-transaction
7: transaction-unique-key \(\leftarrow\) unique stream transaction ID
8: end
```  
**Algorithm A2**Publish transaction in IoT blockchain```
1:Procedure IoT-blockchain-data-loss-verification
2:Input: STRING IoT blockchain stream-name, BOOLEAN var-no-data-loss
3:Output: BOOLEAN var-no-data-loss
4:var-no-data-loss \(\leftarrow\) True
5:all-stream-item\(\leftarrow\) listitem IoT blockchain stream
6:traverse all node in IoT blockchain
7:begin
8:if (not last node) then
9: current-stream-item\(\leftarrow\) listitem current node stream
10: if (all-stream-item < > current-stream-item) then
11: begin
12: var-no-data-loss \(\leftarrow\) False
13: exit to end-process
14: end
15: shutdown current node
16: traverse next node until last node
17:end-process
18: resume all shutdown nodes
19: return var-no-data-loss
20:end
```

**Algorithm 13**Verification of no data loss in IoT blockchain

## References

* (1)
* [PERSON] et al. (2019) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]. Internet-of-Things (IoT)-Based Smart Agriculture Toward Making the Fields Talk. IEEE Access**2019**, 7, 129551-129583. [CrossRef]
* [PERSON] and [PERSON]. Study of IoT: Understanding IoT Architecture, Applications, Issues and Challenges. In Proceedings of the 1 st International Conference on Innovations in Computing & Networking (ICICN'16), CSE, RRCE, Bengaluru, Karnataka, 12-13 May 2016; p. 2. * [PERSON] et al. (2017) [PERSON]; [PERSON], [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] Yield gaps in oil palm: A quantitative review of contributing factors. Eur. J. Agron. **2017**, _83_, 57-77. [CrossRef]
* [PERSON] (2002) [PERSON] Nutrition and Nutrient Management of the Oil Palm--New Thrust for the Future Perspective. In Potassium for Sustainable Crop Production; Potsah Research Institute of India; International Potash Institute: New Delhi, India, 2002; pp. 416, 420-425, 427. * Malaysia Palm Oil Board FFB Yield Report 2015. Available online: [[https://bepi.mpob.gov.my/index.php/en/yield/yield-2015](https://bepi.mpob.gov.my/index.php/en/yield/yield-2015)]([https://bepi.mpob.gov.my/index.php/en/yield/yield-2015](https://bepi.mpob.gov.my/index.php/en/yield/yield-2015)) /yield-2015 (accessed on 10 December 2018). * [PERSON] et al. (2017) [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; [PERSON] [PERSON]; Pradesh, U.; Pradesh, U. A Systematic Review on Evolution of Blockchain Generations. Int. J. Inf. Technol. Electr. Eng. **2018**, \(7\), 1-8. * [PERSON] et al. (2017) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Monitoring Citrus Soil Moisture and Nutrients Using an IoT Based System. Sensors**2017**, _17_, 447. [CrossRef] [PubMed]
* [PERSON] et al. (2017) [PERSON] [PERSON]; [PERSON]; [PERSON] _Traffic Light Soil Water Sensor for Resources Poor Farmer_; Australian Centre for International Agricultural Research: Canberra, Australia, 2017. * [PERSON] et al. (2015) [PERSON]; [PERSON]; [PERSON] Detection of NPK nutrients of soil using fiber optic sensor.