## 3 Proposed Methodology
### CFChain
#### 3.3.2 Module Design of CFChain  
In CFChains, there are pre-deployed contracts to support citations, feedback and ratings.  
For users participating in producing blocks and transaction verifications, all three blockchains must be maintained locally. So, another blockchain should not be regarded as the external environment. Since an CFChain only needs to query the OI and identity of the OIChain for verification, it does not need high-cost cross-chain solutions or oracles.  
Before the contract verification, the OSCMS adds a pre-verification stage when collecting transactions, which is executed locally without changing the blockchain state. Each verification node needs to call the RPC interface of the OIChain locally to obtain the required OI and identity. If the pre-verification fails, the transaction will be directly discarded and not executed. Since a verification node can trust all blockchains maintained locally, cross-chain verification can be quickly and reliably realized at a low cost. The schematic diagram is shown in Figure 6.  
Figure 6: Transaction execution process with pre-verification stage.  
The general submission processes of citations, feedback and ratings are similar. Algorithm 5 describes them.  
```
0:\(CIstruct\parallel FEstruct\parallel REstruct\)
0:true or false
1:if\(CONTRACT_{CI}:FUN_{cite}\) is called then
2:\(CONTRACT_{CI}:FUN_{cite}\longleftarrow CIstruct\)
3:pre-verification:
4:\(RPC_{OIChair}\longleftarrow linkID\), \(RPC_{OIChair}\longleftarrow<CIPu_{k}\),\(OIstruct.CommunityID>\)
5:\(Get\ Olstruct\& identity_{CIPu_{k}}\)
6:if\(OIstruct==null\parallel identity_{CIPu_{k}}==null\)then
7:\(Discard\) the transaction
8:return\(false\);
9:endif
10:Record\(CIstruct\) & various mapping relationships
11:return\(true\);
12:elseif\(CONTRACT_{TE}:FUN_{feedback}\) is called then
13:... //the whole process is basically the same as citation
14:else
15:\(CONTRACT_{RA}:FUN_{\emph{tare}}\longleftarrow RAstruct\)
16:pre-verification:... //in addition to checking whether \(OIstruct.Pu_{k}\) is \(OIPu_{k}\), other processes are the same
17:if\(rated[RAPu_{k},linkID]==true\)then
18:return\(false\);
19:endif
20:Record\(RAstruct\) & various mapping relationships
21:Update\(r_{OI}\) & \(R_{Oltot}\)
22:return\(true\);
23:endif
```  
**Algorithm 5** The whole process of submitting citations, feedback or ratings  
Unidentified users cannot submit any citations, feedback or ratings. Each \(RAPu_{k}\) can rate the same \(linkID\) once, but there is no such restriction on citation and feedback transactions. In addition to storing submitted information, various mapping relationships are also stored through smart contracts, which provide different query methods or restrictions. Rating transactions are special and ultimately affect \(R_{Oltot}\). The query methods for citation and feedback include: querying how many citation or feedback records an OI corresponding to \(linkID\) has and querying a certain item; and querying how many records a user corresponding to \(CIPu_{k}\) or \(FEPu_{k}\) submits and querying a certain item. As for ratings, users can query whether they have rated a \(linkID\) and query \(r_{OI}\) or \(R_{Oltot}\). Authentication is not required for querying.