# A Novel Proof-of-Reputation Consensus for Storage Allocation in Edge Blockchain Systems 精读笔记（四）

## PERFORMANCE EVALUATION

A. Simulation Process and Settings
Since global reputation is standardized, nodes can use a variety of reputation mechanisms. In our simulations, all nodes use a simple personal reputation mechanism. We describe the mechanism in the perspective of an honest node i evaluates personal reputation pij of a node j.

• Node i records the number of good evaluations goodij and total evaluations of node totij . If node i receives a piece of data from node j, then totij = totij + 1. If the data is complete, goodij = goodij + 1.
• If node i gives a piece of data to j, totij = totij + 1. If node j increases pij after receives the data from i, then goodij = goodij + 1.
• pij = goodij/totij .

We generate an operation list, representing the operations of the nodes in the network arranged in chronological order. From the perspective of node i, we introduce the following two operations.

• Node i generates a new piece of data. Node i provides the data size, queries the latest block generator for storage locations, and stores the data in the corresponding locations.
• Node i accesses a piece of existing data. Node i accesses the data from node j that owns the data to minimize rij/pij .

A. 模拟过程和设置

• 节点 i 记录良好评价的数量 goodij节点 totij 的总评价。如果节点 i 从节点 j 接收到一条数据，则 totij = totij + 1。如果数据完整，goodij = goodij + 1。

• 如果节点 i 给 j 一条数据，totij = totij + 1。如果节点 j 收到 i 的数据后增加 pij，则 goodij = goodij + 1。

• pij = goodij/totij。

• 节点 i 生成一条新数据。节点 i 提供数据大小，查询最新的块生成器的存储位置，并将数据存储在相应的位置。
• 节点 i 访问一条现有数据。节点 i 从拥有数据的节点 j 访问数据以最小化 rij/pij

After each access, nodes related to the access update the personal reputation of each other. When the number of operations reaches a threshold, the node with the highest global reputation becomes a new block generator. It generates a new block and updates the global reputation.

We generate the total storage resource Wtol(i) for each node i by a normal distribution, N(1000000; 100000) KB. We generate the size of each piece of data by N(100; 30) KB. Each piece of data will be accessed by a uniformly random node multiple times, which are generated by N(10; 2). We generate an operation list, and the simulation runs according to that list. The number of generating operations divided by the number of access operations is approximately 0.1, and they appear evenly in the list. When the number of operations not on the blockchain reaches 110, the node that satisfies condition (13) generates a new block that records these operations. We terminate simulations when the number of blocks reaches 1000. We generate the test network G = (V， E) by the Watts-
Strogatz model [29]. This model generates networks that reveal properties of some real communication networks.

We let honest nodes constantly give factual evaluations and provide complete data. To test the security of our design, we make some nodes malicious. Malicious nodes perform badmouthing attacks by conducting malicious evaluations after operations. In addition, malicious nodes may refuse to provide
data. The attack probability is 0.5, that is, there is a probability of 50% that malicious nodes make wrong evaluations, and malicious nodes refuse to provide data with a probability of 50%. Considering the worst case, we assume that all malicious nodes always make good evaluations with each other. We run simulations under environments that include the different proportions of malicious nodes. We only show measurements of honest nodes, since our system is designed for honest nodes.

We use the algorithm in [19] as the benchmark. In the following simulation, we compare the results of the algorithm and the benchmark.

B. Decentralization Test

We count the number of blocks generated by each node, and use a histogram in Fig. 2 to show the distribution of the number under different proportions of malicious nodes. The reason for the distribution of a certain number of nodes in the range of 0 to 19 is that all malicious nodes are distributed in this range. It is worth mentioning that in all simulations, malicious nodes can generate up to 2 blocks out of 1000. Very few honest nodes generate more than 100 blocks or less than 20 blocks, and no node generates more than 120 blocks. Most honest nodes can generate 40 to 100 blocks. These phenomena show that in the PoR blockchain, most honest nodes can generate close to the average number of blocks, and very few nodes generate a small or large number of blocks. Thus, we can conclude that our PoR blockchain is decentralized, and it can ensure that the block generators are honest with a high probability.

B. 去中心化测试

C. Fairness Test

We use the Gini coefficient1 of the used storage ratio to show the fairness of our system. Once a new block is generated, we compute the Gini coefficient of the used storage ratio for all honest nodes. In Fig. 3(b), in different proportions of malicious nodes, the Gini coefficients of all tests decrease with blocks increase. Although the Gini coefficients are unstable at the beginning, it decreases as the block is generated, and finally converges to less than 0.2. The reason for this phenomenon is similar to the reason for the phenomenon Fig. 3(a), reputation gaps in the initial stages also affect the balance of storage allocation results. As blocks increase, the used storage ratio balances. Therefore, we can conclude that our algorithm is fair in the long term.

C. 公平测试

D. Efficiency Test

To show the efficiency of our algorithm, we count the average hop-count distance to access data. Since the benchmark is an efficient algorithm, we can conclude that our algorithm is efficient if the average hop-count distance of data request computed by these two algorithms is close. In Fig. 4(a), the average hop-count distance computed by our algorithm rapidly reaches 2, then increases slowly and stabilizes at 2.2. Fig.4(b) shows that the growth rate of the average hop-count distance computed by the benchmark algorithm is relatively slow, and the average eventually tended to around 2.2. The average access distance of our algorithm is unstable at the beginning, and after rapid stabilization, it is close to the result obtained by the benchmark.

D. 效率测试

E. Successful Access Rate Test

The successful access rate test reveals the reliability of our algorithm. The reliability requires the algorithm to store data to honest nodes, and it is supposed to improve the successful access rate. Once a new block is generated, we compute the successful rate of accessing data. In Fig. 5(a), the successful access rate is above 99.9% in all simulations. In Fig. 5(b), the successful access rate decreases significantly with the increase in the proportion of malicious nodes. When the network includes 40% malicious nodes, compared with the benchmark, our algorithm improves the successful access rate by 14.6%. Therefore, our algorithm greatly improves the successful access rate compared with the benchmark and meets the reliability requirements.

E. 成功的访问速率测试

## CONCLUSION AND FUTURE WORK

In this paper, we have proposed a reputation mechanism that consists of personal reputation and global reputation. All nodes evaluate others by personal reputations, and they obtain global reputations by aggregating the same personal reputations of all nodes. We have designed a storage allocation mechanism that satisfies fairness, efficiency, and reliability. We have constructed a PoS blockchain based on our reputation mechanism, which costs low computing power and avoids centralization. Our simulations show that our system meets our expectations from multiple measurements. The storage allocation algorithm improves the access success rate while maintaining fairness and efficiency. In the case of malicious nodes that may not provide data, our system can achieve a 99.9% success rate of accessing data. The simulations also show that the PoR blockchain prevents centralization and ensures that the block generators are honest with a high probability.
In edge networks, new devices and servers will replace old devices and servers. It requires us to manage the joining and leaving of nodes. In addition, we use a permissioned blockchain to manage access to the blockchain to prevent attacks. Based on the above two concerns, we will further improve the permissioned blockchain network protocol to manage nodes joining and leaving the network, and eliminate nodes with lower reputations.

## ACKNOWLEDGMENT

The work in this paper was supported in part by the grant from US National Science Foundation under grant numbers 1513719 and 1730291.

## REFERENCES

[1] W. Yu, F. Liang, X. He, W. G. Hatcher, C. Lu, J. Lin, and X. Yang, “A survey on the edge computing for the internet of things,” IEEE access, vol. 6, pp. 6900–6919, 2017.
[2] P. Beckman, R. Sankaran, C. Catlett, N. Ferrier, R. Jacob, and M. Papka, “Waggle: An open sensor platform for edge computing,” in 2016 IEEE SENSORS. IEEE, 2016, pp. 1–3.
[3] X. Cheng, J. Liu, and C. Dale, “Understanding the characteristics of internet short video sharing: A youtube-based measurement study,” IEEE transactions on multimedia, vol. 15, no. 5, pp. 1184–1194, 2013.
[4] L. Mendiboure, M. A. Chalouf, and F. Krief, “Survey on blockchainbased applications in internet of vehicles,” Computers & Electrical Engineering, vol. 84, p. 106646, 2020.
[5] W. Sun, J. Liu, Y. Yue, and P. Wang, “Joint resource allocation and incentive design for blockchain-based mobile edge computing,” IEEE Transactions on Wireless Communications, vol. 19, no. 9, pp. 6050– 6064, 2020.
[6] Y. Yuan and F.-Y. Wang, “Towards blockchain-based intelligent transportation systems,” in 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC). IEEE, 2016, pp. 2663–2668.
[7] P. Kochovski, S. Gec, V. Stankovski, M. Bajec, and P. D. Drobintsev, “Trust management in a blockchain based fog computing platform with trustless smart oracles,” Future Generation Computer Systems, vol. 101, pp. 747–759, 2019.
[8] S. Nakamoto et al., “Bitcoin: A peer-to-peer electronic cash system,” 2008.
[9] T. Swanson, “Consensus-as-a-service: a brief report on the emergence of permissioned, distributed ledger systems,” Report, available online, 2015.
[10] G. Wood et al., “Ethereum: A secure decentralised generalised transaction ledger,” Ethereum project yellow paper, vol. 151, no. 2014, pp. 1–32, 2014.

[11] M. Liu, K. Wu, and J. J. Xu, “How will blockchain technology impact auditing and accounting: Permissionless versus permissionedblockchain,” Current Issues in Auditing, vol. 13, no. 2, pp. A19–A29, 2019.
[12] C. Cachin et al., “Architecture of the hyperledger blockchain fabric,” in Workshop on distributed cryptocurrencies and consensus ledgers, vol. 310, no. 4. Chicago, IL, 2016.
[13] M. Hearn, “Corda: A distributed ledger,” Corda Technical White Paper, vol. 2016, 2016.
[14] F. Gai, B. Wang, W. Deng, and W. Peng, “Proof of reputation: A reputation based consensus protocol for peer-to-peer network,” in International Conference on Database Systems for Advanced Applications. Springer, 2018, pp. 666–681.
[15] J. Yu, D. Kozhaya, J. Decouchant, and P. Esteves-Verissimo, “Repucoin: Your reputation is your power,” IEEE Transactions on Computers, vol. 68, no. 8, pp. 1225–1237, 2019.
[16] M. T. de Oliveira, L. H. Reis, D. S. Medeiros, R. C. Carrano, S. D. Olabarriaga, and D. M. Mattos, “Blockchain reputation-based consensus: A scalable and resilient mechanism for distributed mistrusting applications,” Computer Networks, vol. 179, p. 107367, 2020.
[17] E. K. Wang, Z. Liang, C.-M. Chen, S. Kumari, and M. K. Khan, “Porx: A reputation incentive scheme for blockchain consensus of iiot,” Future Generation Computer Systems, vol. 102, pp. 140–151, 2020.

[18] G. Qiao, S. Leng, H. Chai, A. Asadi, and Y. Zhang, “Blockchain empowered resource trading in mobile edge computing and networks,” in ICC 2019-2019 IEEE International Conference on Communications (ICC). IEEE, 2019, pp. 1–6.
[19] Y. Huang, J. Zhang, J. Duan, B. Xiao, F. Ye, and Y. Yang, “Resource allocation and consensus on edge blockchain in pervasive edge computing environments,” in 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS). IEEE, 2019, pp. 1476–1486.
[20] X. Lin, J. Wu, S. Mumtaz, S. Garg, J. Li, and M. Guizani, “Blockchainbased on-demand computing resource trading in iov-assisted smart city,” IEEE Transactions on Emerging Topics in Computing, 2020.
[21] F. Ayaz, Z. Sheng, D. Tian, and Y. L. Guan, “A proof-of-quality-factor (poqf) based blockchain and edge computing for vehicular message dissemination,” IEEE Internet of Things Journal, 2020.
[22] X. Huang, R. Yu, J. Kang, and Y. Zhang, “Distributed reputation management for secure and efficient vehicular edge computing and networks,” IEEE Access, vol. 5, pp. 25 408–25 420, 2017.
[23] M. Liu, F. R. Yu, Y. Teng, V. C. Leung, and M. Song, “Distributed resource allocation in blockchain-based video streaming systems with mobile edge computing,” IEEE Transactions on Wireless Communications, vol. 18, no. 1, pp. 695–708, 2018.
[24] L. Xiao, Y. Ding, D. Jiang, J. Huang, D. Wang, J. Li, and H. V. Poor, “A reinforcement learning and blockchain-based trust mechanism for edge networks,” IEEE Transactions on Communications, 2020.
[25] S. D. Kamvar, M. T. Schlosser, and H. Garcia-Molina, “The eigentrust algorithm for reputation management in p2p networks,” in Proceedings of the 12th international conference on World Wide Web, 2003, pp. 640– 651.
[26] T. Haveliwala and S. Kamvar, “The second eigenvalue of the google matrix,” Stanford, Tech. Rep., 2003.
[27] G. Cornu´ejols, G. Nemhauser, and L. Wolsey, “The uncapicitated facility location problem,” Cornell University Operations Research and Industrial Engineering, Tech. Rep., 1983.
[28] S. Li, “A 1.488 approximation algorithm for the uncapacitated facility location problem,” Information and Computation, vol. 222, pp. 45–58, 2013.
[29] D. J. Watts and S. H. Strogatz, “Collective dynamics of ‘smallworld’networks,” nature, vol. 393, no. 6684, pp. 440–442, 1998.
[30] Y. Huang, X. Song, F. Ye, Y. Yang, and X. Li, “Fair caching algorithms for peer data sharing in pervasive edge computing environments,” in 2017 IEEE 37th International Conference on Distributed Computing Systems (ICDCS). IEEE, 2017, pp. 605–614.
[31] D. Wei, K. Zhu, and X. Wang, “Fairness-aware cooperative caching scheme for mobile social networks,” in 2014 IEEE international conference on communications (ICC). IEEE, 2014, pp. 2484–2489.

1. The Gini coefficient is widely used to measure the statistical disparities, and previous work [30], [31] used it to measure the fairness properties in edge environments.基尼系数被广泛用于衡量统计差异，之前的工作[30]、[31]用它来衡量边缘环境中的公平性。 ↩︎ ↩︎

THE END

)">