# An ICN-Based IPFS High-Availability Architecture
## 4 Enhanced Node Selection Algorithm
### High-Influence Node Selection Algorithm Based on Node Traffic  
Our algorithm is called PwRank is mainly optimized for VoteRank and Enrenew in weighted application scenarios. We represent the IPFS network in the resolution domain as a weighted network \(G(V,E,W)\), where the weight \(\omega_{ij}\) denotes the number of packets sent to each other between \(n\) node \(i\) and node \(j\) over a period of time, \(\omega_{ij}=\omega_{ji}\). To consider  
Figure 7: Enhanced nodes for different roles. local information, we still use information entropy to calculate the mutual voting ability between nodes. \[E_{i}=\sum_{j\in\Gamma i}H_{ji}=\sum_{j\in\Gamma i}-p_{ji}logp_{ji} \tag{20}\]  
This is the formula for calculating node scores based on information entropy proposed by Enrenew based on VoteRank [42]. \(E_{i}\) denotes the voting score of node \(i\), while \(H_{ji}\) denotes the voting power given to node \(i\) by each neighbor node \(j\). \(p_{ji}\) is related to the node degree, denoted as \(p_{ji}=\frac{d_{ji}}{\sum_{k\in\Gamma i}d_{ki}}\), \(\sum_{k\in\Gamma i}d_{ki}\) is denoted as the sum of all degrees of node \(i\)'s directly connected neighbor node \(k\), \(d_{ji}\) denotes the degree of node \(i\)'s neighbor node \(j\), and \(\Gamma i\) denotes the set of node \(i\)'s direct neighbors, so \(\sum_{j\in\Gamma i}p_{ji}=1\). However, this formula has the limitation that it does not reflect the weight influence when selecting the influence nodes of the weighted network. \[S_{i}=\sum_{j\in\Gamma i}H_{\omega_{ji}}=\sum_{j\in\Gamma i}\omega_{ji}H_{ji}= \sum_{j\in\Gamma i}-\omega_{ji}p_{ji}logp_{ji} \tag{21}\]  
Equation (21) is used for calculating the voting fraction of a weighted network node \(i\), where \(\omega\) denotes the weight, and \(\omega_{ji}\) denotes the weight between node \(j\) and node \(i\). \(H_{\omega_{ji}}\) denotes the ability of node \(j\) to vote on node \(i\) in the weighted network. For any \(\omega=1\), the network is denoted as an unweighted network. In the IBIHA architecture, the enhanced nodes have a higher reputation after a stable operation because of their stronger resolving ability and better delivery quality. There exists a higher probability that the Bitswap mechanism of ordinary IPFS nodes in the network will include them in the peer list. A reasonable deployment scheme for an enhanced node must prevent the coverage of the node's influence domain. If, for an ordinary node, multiple enhanced nodes appear within a one-hop distance, then there is bound to be an overlap of influence. Therefore, when an augmented node is deployed, it must be optimal for its neighboring nodes within at least one hop. In a realistic network, this can be expressed as a voting process in which all persons vote for those with close relationships, so the voting power accumulates as the closeness is passed, and when the first round of voting is over, a winner is bound to emerge. Therefore, for the winner's surrounding people, intimate voting ability must be suppressed. When the node with the highest influence is filtered, for its directly connected neighboring nodes, we can call it the influenced node. The influential node needs to suppress the voting ability of its neighboring nodes to the maximum, and its suppression ability decreases with the spread of the range, so the voting ability suppression model for neighboring nodes can be expressed by the following equation. \[f*H_{\omega_{ji}}=(1-P_{M})^{\sigma}\ \omega_{ji}H_{ji} \tag{22}\]  
In the above equation, \(f=(1-P_{M})^{\sigma}\), where the suppression factor \(f\) indicates that the voting ability of node \(j\) for \(i\) is suppressed, \(P_{M}\) denotes the resolution ability of the enhanced node, and \(\sigma\) denotes the influence range of the enhanced node. When \(\sigma=2\), the suppression factor of the enhanced node for the directly connected neighbor nodes is \(\left(1-P_{M}\right)^{2}\), while the suppression factor of the neighbor nodes of the directly connected neighbor nodes is \(\left(1-P_{M}\right)\), see Algorithm 1.