# Reputation Consensus Mechanism for Blockchain Based on Information-Centric Networking
## 4 Design
### Reputation Model
#### 4.1.1 Reputation Evaluation Dimensions and Parameter Selection  
We evaluate the reputation of ICN consensus nodes along two dimensions: objective trust and historical trust. For objective trust, we use quantitative standards to reduce the risk of collusion attacks arising from subjective evaluations, thereby resisting conspiracies by fraudulent nodes. For historical trust, based on nodes' accumulated contributions and behaviors, nodes must continuously participate in the blockchain and ICN network to ensure the continuity of their reputation, preventing Sybil attacks and whitewashing attacks. The specific parameter selection and calculations are as follows:  
**Blockchain Stake:** The node's blockchain contribution is quantified by its staking ratio and block generation rate. The blockchain reputation increment is expressed as:  
\[\Delta R_{c}(n)=\alpha_{P}\cdot P(n)+\alpha_{B}\cdot B(n), \tag{3}\]  
where \(\Delta R_{c}(n)\) is the reputation increment from blockchain stake during the \(n\)-th interval. \(P(n)\) and \(B(n)\) represent the proportions of the staked amount and the block generation rate within a reputation cycle \(T_{R}\), respectively, and \(\alpha_{P}\) and \(\alpha_{B}\) are the weights for these factors. By using the staking amount ratio and block generation rate as evaluation indicators, we enhance the node's commitment to the network and reduce the possibility of malicious attacks. For new blockchain nodes joining the ICN network, the trust management system assigns an initial reputation based on blockchain contributions:  
\[R_{0}=R_{c}(0)=\alpha_{P}\cdot P_{0}+\alpha_{B}\cdot B_{0}, \tag{4}\]  
where \(P_{0}\) and \(B_{0}\) are the staked amount and initial block generation rate upon joining. **ICN Network Contribution:** The node's comprehensive performance in the ICN network encompasses service quality and network performance. From the aspects of network Quality of Service (QoS) and network performance, we select parameters that affect the node's performance when forwarding blocks. Within a reputation cycle \(T_{R}\), the reputation increment from ICN contributions is calculated as:  
\[\Delta R_{i}(n)=\beta_{T}\cdot T(n)+\beta_{F}\cdot F(n)+\beta_{E}\cdot E(n)+ \beta_{C}\cdot C(n) \tag{5}\]  
where \(\Delta R_{i}(n)\) is the reputation increment from ICN network contributions during the \(n\)-th interval. \(T(n)\), \(F(n)\), \(E(n)\), and \(C(n)\) represent the node's average online rate, failure rate, traffic forwarding rate, and cache hit rate, respectively; \(\beta_{T}\), \(\beta_{F}\), \(\beta_{E}\), and \(\beta_{C}\) are the corresponding weights. In terms of network QoS, parameters like average online rate and failure rate evaluate the node's reliability and stability. For network performance, parameters like traffic forwarding efficiency and cache hit rate evaluate the node's efficiency. Quantifying these indicators allows us to effectively assess service quality and performance, ensuring that nodes with excellent network performance participate in blockchain consensus, thereby enhancing consensus efficiency and block transmission reliability. Combining the calculations for the node's blockchain stake and ICN network contribution, the reputation value growth of the multidimensional objective reputation model within one cycle is:  
\[\Delta R(n)=\Delta R_{c}(n)+\Delta R_{i}(n).\]  
This formula reflects the comprehensive performance of nodes in on-chain activity and network service quality. The incremental reputation values \(\Delta R(n)\) for different periods can be represented by the following matrix:  
\[ \begin{bmatrix}\Delta R(1)\\ \Delta R(2)\\ \vdots\\ \Delta R(n)\end{bmatrix} = \begin{bmatrix}P(1)&B(1)&T(1)&F(1)&E(1)&C(1)\\ P(2)&B(2)&T(2)&F(2)&E(2)&C(2)\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ P(n)&B(n)&T(n)&F(n)&E(n)&C(n)\end{bmatrix}\begin{bmatrix}\alpha_{P}\\ \alpha_{B}\\ \beta_{T}\\ \beta_{E}\\ \beta_{C}\end{bmatrix}