## 4 The Proposed Scalable Blockchain Trust Management System (SBTMS)
### Step 1: Calculating Confidence Score and Message Reliability  
A vehicle, by observing a given event, independently broadcasts the massage to the neighbor vehicles. This message is 5-tuple \((v_{s},LL,e,m,t)\), where \(V_{s}\) indicates identification of sender vehicle, \(LL\) shows event location including longitude and latitude, \(e\) indicates event type of message, \(m\) is message's ID, and \(t\) represents time stamp. The message reliability is calculated for a given message type and message sender, and is based on two effective cases: (1) the distance between message sender and event location (i.e., event confidence score) and (2) the level of reliability of the message sender for the given message type. The message that sent by the nearest vehicles to the event is more reliable than those sent by further vehicles. Therefore, the receiver can calculate a confidence score \(C_{s}\) based on the distance for the event \(e\) using Equation (1). \[c_{s}=\frac{1}{1+e^{s\left(g-\left(\{d_{s}\}^{-1}\right)\right)}} \tag{1}\]  
Here, \(C_{s}\) is confidence score for the event that has been sent by \(V_{s}\), \(d_{s}\) is distance between the sender message and the event location (\(LL\)). If \(V_{s}\) does not send a message, then \(C_{s}\) the value is equal to 0. Due to the mobility of vehicles in the VANET, several vehicles may observe an event in the network. Thus, a vehicle may receive the same messages from different senders. Consequently, the receiver calculates several confidence scores for these same messages based on the distance of its sender and the event location. Vector \(C=c_{1}\), \(c_{2}\),... shows the confidence scores. After that, each vehicle requests the net reliability level for message sender \(V_{s}\) from the nearest RSU. The RSU sends the net reliability level \(O\)s to the requester. Therefore, the requester can calculate message reliability given by net reliability on a given type of message and confidence score of the message type (i.e., \(P(m|O,C)\)) as follows:  
\[P(m|O,C)=\frac{P(m|C)\times P(C|m,O)}{P(m|C)\times P(C|m,O)+P(m|C)\times P(C| m,O)} \tag{2}\]  
where \(P(m\mid C)\), \(P(C\mid m,O)\), \(P(C\mid m,O)\) are given by Equations (3)-(5). \[P(m|C)=\frac{P(m)\times\prod_{s=1}^{N}P(c_{s}|m)}{P(m)\times\prod_{s=1}^{N}P( c_{s}|m)+P(m)\times\prod_{s=1}^{N}P(c_{s}|m)} \tag{3}\] \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbols** & **Definition** \\ \hline \(m\) & event message \\ \(LL\) & Longitude and Latitude \\ \(V_{s}\) & message sender \\ \(d_{s}\) & The distance between the sender and the event \\ \(c_{s}\) & The validity of the message m from the Vs sender \\  & calculated by each vehicle \\ \(C\) & Vector of sum of values of Cs from different senders \\  & for a message m \\ \(o_{s}\) & The amount of net reliability of Vs sender which is \\  & calculated by RSU \\ \(O\) & Vector of sum of Os values from different senders \\  & for a message m \\ \(N^{\prime}\) & The number of vehicles participating in the scoring \\ IP & IP of each RSU \\ PK & External key of each RSU \\ \(N\) & Total RSUs \\ \(z\) & Maximum size of Committee \\ \(2^{s}\) & Number of Committees \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of parameters and notations. \[P(C|m,O)=\prod_{s=1}^{N}P(c_{s}|m,O) \tag{4}\]  
\[P(c_{s}|m,O)=P(c_{s}|O) \tag{5}\]  
In Equation (5), \(c_{s}\) is independent of message type \(m\), so we have  
\[P(c_{s}|O)=\frac{P(c_{s})\times P(O|c_{s})}{P(c_{s})\times P(O|c_{s})+P( \overline{c_{s}})\times P(O|c_{s})} \tag{6}\]  
In Equation (6), it is assumed that \(P(c_{s})\) follows the normal distribution. Furthermore, \(P=(\overline{c_{s}})\) is equal to \(1-P(c_{s})\). In this Equation, \(P(O|c_{s})\) and \(P(o\mid c_{s})\) are given by Equations (7) and (8).