# Blockchain-Based Decentralized Federated Learning Method in Edge Computing Environment
## 2 Related Work
The existing related research mainly solves the one-to-one or N-to-N matching problem, and there is less research on stable matching between M devices and N servers in the edge computing environment. The consensus algorithm, as one of the core ideas of blockchain, can ensure the proper operation of the blockchain, but it has an important impact on communication overhead and model training efficiency. The most commonly used consensus algorithms are proof of stake (PoS) [13], proof of work (PoW) [14], delegated proof of stake (DPoS) [15], and practical Byzantine fault tolerance (PBFT) [16]. The PBFT algorithm is widely used in distributed architectures, but it still suffers from high communication overhead and low reliability of master nodes. Numerous solutions have emerged to address the shortcomings of PBFT. [PERSON] et al. [26] improved the transaction throughput of PBFT by caching blocks, but their method does not perform well on the delay of the consensus process. [PERSON] et al. [8] made the certificate and other information of blocks clear in time without communication between nodes according to the timestamp in the blockchain, but this method does not consider the optimization of the PBFT consistency protocol. [PERSON] et al. [27] combined DPoS and PBFT to make the algorithm with dynamic authorization, but the limited bandwidth still reduces the transaction throughput of the algorithm. On the other hand, some studies are dedicated to reducing the time complexity of PBFT. [PERSON] et al. [28] proposed a scheme to verify the consistency of asynchronous Byzantine nodes through a stochastic prediction model. This scheme randomly selects one of the multi-node proposals in each round of consensus and uses the threshold signature algorithm to reduce the communication cost of each round of consensus to \(O\left(n^{2}\right)\). However, the random selection method of this scheme may cause security problems. [PERSON] et al. [29] proposed a scalable Byzantine algorithm (FastBFT) that introduces a tree data structure to achieve the optimal time complexity of \(O(nlogn)\). However, in the worst case, the time complexity of FastBFT is still \(O\left(n^{2}\right)\). [PERSON] et al. [30] improved the consensus efficiency by caching blocks and smart contract techniques, but without reducing the time complexity of PBFT. [PERSON] et al. [31] proposed a PBFT algorithm based on randomly selected collectors. It can reduce the communication cost to a linear level, but if the selected collector is malicious, the communication cost of the algorithm will rise sharply. However, these consensus algorithms are not applicable to real blockchain and edge computing application scenarios, and still have high computational complexity. In this work, we present BD-FL to solve the single node failure and network communication overhead problems of centralized federated learning. BD-FL introduces an incentive mechanism to increase the contribution of local devices to global model training. We also propose a stable matching algorithm and the R-PBFT algorithm to reduce the number of nodes participating in communication and consensus, which reduces the system delay and improves the model training efficiency.