  This paper presents a novel reference architecture for blockchain-enabled
federated learning (BCFL), a state-of-the-art approach that amalgamates the
strengths of federated learning and blockchain technology.We define smart
contract functions, stakeholders and their roles, and the use of interplanetary
file system (IPFS) as key components of BCFL and conduct a comprehensive
analysis. In traditional centralized federated learning, the selection of local
nodes and the collection of learning results for each round are merged under
the control of a central server. In contrast, in BCFL, all these processes are
monitored and managed via smart contracts. Additionally, we propose an
extension architecture to support both crossdevice and cross-silo federated
learning scenarios. Furthermore, we implement and verify the architecture in a
practical real-world Ethereum development environment. Our BCFL reference
architecture provides significant flexibility and extensibility, accommodating
the integration of various additional elements, as per specific requirements
and use cases, thereby rendering it an adaptable solution for a wide range of
BCFL applications. As a prominent example of extensibility, decentralized
identifiers (DIDs) have been employed as an authentication method to introduce
practical utilization within BCFL. This study not only bridges a crucial gap
between research and practical deployment but also lays a solid foundation for
future explorations in the realm of BCFL. The pivotal contribution of this
study is the successful implementation and verification of a realistic BCFL
reference architecture. We intend to make the source code publicly accessible
shortly, fostering further advancements and adaptations within the community.
