# CoNTe: A Core Network Temporal Blockchain for 5G
## 3 Federated Byzantine Agreement Consensus
### Transaction and Protocol Messages
```
FunctionMessage(\(type\), \(localIndex\), \(key\)): \(msg.index\gets localIndex\) \(msg.type\gets type\) // peer, sync, propose, or prune \(msg.peer\gets peer\) \(msg.signature\gets key\) returnmsg FunctionResponse(\(type\), \(msg.index\), \(key\)): \(msg\gets Message(type,peer,key)\) \(msg.response\gets type\) // acknowledge or negative acknowledge \(msg.peer\gets peer\) \(msg.signature\gets key\) returnmsg FunctionCommit: \(ack_{p}\gets msg_{q}\) \(



## 5 Handling Transmission Contention

As an asynchronous system without a static resource allocation, additional controls are needed in order to handle contention in transmissions. In addition to time-to-live limits on transactions, Conte handles conflict in the network using a binary exponential back-off mechanism, mirroring that of CSMA/CD in WiFi networks. The channel sensing in this case is the monitoring of the directly connected peered network interfaces for the transaction traffic of peer nodes. Under the CSMA/CD model [31], a transmitting node must wait some minimum sensing period in order to confirm the transmission medium is idle. In practice, if the transmission medium is not idle, then the node selects a random back-off duration, in seconds (contention window), and counts down. This back-off is chosen uniformly in the range \([0,2^{i}W_{0}-1]\), where \(i\) is the number of times a node has attempted to issue the transaction (back-off stage), initialized at 0, and \(W_{0}\) is the minimum sensing period [32]. If a node receives subsequent transactions during the sensing period, it pauses its countdown, and continues decrementing once the transmission medium is clear. After transmitting successfully, \(i\) is reset to 0. A maximum \(m\) number of retransmissions attempts \(i\) is also set, to apply a bound for maintaining liveliness. Again, matching the behavior of CSMA/CD, a node makes two attempts at the maximum back-off stage, before considering the block a failed transmission. This mechanism of congestion control is chosen, as it represents a worst case scenario in which only directly connected peers are known-with no visibility beyond, as opposed to Reno, Tahoe, and other congestion control algorithms available directly in TCP, which require maintaining a route table that eventually extends to includes all graph hosts. A summary pseudocode of Conte consensus, inclusive of back-off timing, is provided in Algorithm 2. The CSMA/CD model provides four contention probabilities that can be represented as a two-dimensional Markov chain with one step transition probabilities, as explained in [32] with possible states represented where \(t\) in our case is a block retransmission attempt, and \(s\) is the sensing period. These Markov transition probabilities are represented as (1), where \(P_{w}\) is the contention probability of the transmission medium, \(W_{0}\) is the minimum sensing period length, \(W_{i}=2^{i}W_{0}\) is the sensing period length at a given block attempt \(i\), and \(i=m\) at the maximum retransmission attempt:

\[\left\{ \begin{array}{ll}&P\{t,s|t,s+1\}=1,\ \ \ \ \ \ s\in(0,W_{i}-2)\ \ \ \ t\in(0,m+1)\\ &\\ P\{0,s|t,0\}=\frac{1-P_{w}}{W_{0}},\ \ \ \ \ s\in(0,W_{0}-1)\ \ \ \ t\in(0,m+1)\\ &\\ P\{t,s|t-1,0\}=\frac{P_{w}}{W_{j}},\ \ \ \ s\in(0,W_{i}-1)\ \ \ \ t\in(1,m+1)\\ &\\ P\{0,s|m+1,0\}=\frac{P_{w}}{W_{0}},\ \ \ s\in(0,W_{m}-1)\end{array} \right. \tag{1}\]

In descending order, these probabilities (1) are the transition probability of going from idle to successful transmission; the second representing the transition probability after successful transmission of having a subsequent successful transmission; the third represents the transition probability after an unsuccessful transmissions, in which the contention window \(W_{0}\) is doubled, as defined by \([0,2^{i}W_{0}-1]\); the last equation represents the transition probability after a fully failed transmission in which the contention window resets to 0.