  Blockchain has been forming the central piece of various types of
vehicle-to-everything (V2X) network for trusted data exchange. Recently,
permissioned blockchains garner particular attention thanks to their improved
scalability and diverse needs from different organizations. One representative
example of permissioned blockchain is Hyperledger Fabric ("Fabric"). Due to its
unique execute-order procedure, there is a critical need for a client to select
an optimal number of peers. The interesting problem that this paper targets to
address is the tradeoff in the number of peers: a too large number will degrade
scalability while a too small number will make the network vulnerable to faulty
nodes. This optimization issue gets especially challenging in V2X networks due
to mobility of nodes: a transaction must be executed and the associated block
must be committed before the vehicle leaves a network. To this end, this paper
proposes an optimal peers selection mechanism based on reinforcement learning
(RL) to keep a Fabric-empowered V2X network impervious to dynamicity due to
mobility. We model the RL as a contextual multi-armed bandit (MAB) problem. The
results demonstrate the outperformance of the proposed scheme.
