Vehicular social network is emerging as a new promising concept, combining two types of network paradigms, namely, vehicular networks and social networks. In order to manage efficiently the security and the control of the network, this paper proposes a new framework based on the emerging concepts of software-defined vehicular network (SDVN) and blockchain. Using the SDVN makes the network more programmable, virtualized, and partitionable. However, on the other hand, it also creates a well-known vulnerability of a single point of failure. Hence, we propose to introduce the blockchain paradigm that will enable the certification of transactions and ensure data anonymity in a fully distributed manner. To this end, three levels of controllers are needed: a principal controller (PC), roadside units (RSUs), and a local controller. In order to dynamically select miners, a distributed miners connected dominating set algorithm (DM-CDS) has been proposed. The DM-CDS is a single-phase distributed algorithm that supports a dynamic topology based on a trust model and some other network parameters, such as the connectivity degree, the average link quality indicator, and the rank. The performance of the proposed DM-CDS is evaluated throughout multiple scenarios using different parameters, such as trust metric, node density, node mobility, and radio range. The obtained results highlight the importance of such proposed architecture, especially in terms of number of required miners. For instance, when the density of nodes increases, the number of selected miners increases similarly to when the network length increases. The node mobility impacts also on the stability of the selected miners, in terms of withdrawing and joining, showing a variation between 0% and 10%.The trust metric has also an important impact on the selection of miners, as only nodes with a higher trust level are selected to endorse the roles of miners.Trans Emerging Tel Tech. 2019;30:e3650.wileyonlinelibrary.com/journal/ett