Fast Stochastic Peer Selection in Proof-of-Stake Protocols

11/12/2019 ∙ by Quan Nguyen, et al. ∙ 0

The problem of peer selection, which randomly selects a peer from a set, is commonplace in Proof-of-Stake (PoS) protocols. In PoS, peers are chosen randomly with probability proportional to the amount of stake that they possess. This paper presents an approach that relates PoS peer selection to Roulette-wheel selection, which is frequently used in genetic and evolutionary algorithms or complex network modelling. In particular, we introduce the use of stochastic acceptance algorithm [6] for fast peer selection. The roulette-wheel selection algorithm [6] achieves O(1) complexity based on stochastic acceptance, whereas searching based algorithms may take O(N ) or O(logN ) complexity in a network of N peers.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

There have been an upsurge of interests in cryptocurrencies and distributed ledger technologies since Bitcoin’s birth. The underlying blockchain technologies (BCT) have enabled numerous opportunities for business and innovation across different domains from financial, healthcare to logistics.

Proof Of Stake (PoS): is a promising approach to overcome the limitations of PoW, such as electricity consumption and low confirmation rate. PoS [11, 4, 5, 2, 9, 10] leverages participants’ stakes for selecting the creator of the next block [11, 4]. Validators have voting power proportional to their stake. PoS is considered more secure than PoW, as each participant is incentivised to maintain the sustainability of the network.

PoS+DAG (PoS-DAG): StakeDag protocol [8] and StairDag [7] present a general model that integrates PoS model into DAG-based consensus protocols to aim for more safety and liveness of the network. Like its predecessors [1], both consensus protocols generate each block asynchronously to build the DAGs. Consensus on a block is computed from the validating power of Users and Validators of parent blocks. In both protocols [8, 7], a node randomly selects the next peer(s) to gossip with and to generate new event blocks, based on participants’ stakes.

1.1 Peer Selection

Let us consider a network of peers with positive weights ’s. The random peer selection in PoS and PoS-DAG is the problem of selecting a peer randomly from the peers. The probability of selection of a peer is proportional to the weight of . In StakeDag and StairDag, our random peer selection aims not only to select highly trusted peers more frequently than others, but also to prevent any single peer from dominating the network.

2 Peer Selection as Roulette Wheel Selection

2.1 Roulette Wheel Selection

Selection is a crucial part of genetic algorithms (GAs) as good selection will drive fitter solutions in next generation and will have a significant impact on their convergence. Yet it is also important to prevent one extremely fit solution from dominating the entire population as this leads to a loss of diversity. As a simple rule, the fitter an individual, the higher chance of its survival and propagation of its features to next generation.

A straight-forward implemention of the rule is Roulette-wheel selection [3]. The method assumes that every individual can be selected with probability proportional to its fitness. Let us consider individuals, each characterized by its fitness (= 1,2, , ). The selection probability of the -th individual is thus given as: .

This is similar to a Roulette wheel in casino. A circular wheel consists of pies. Each piece gets a portion of the circle, which is proportional to its fitness value . Then a random selection is made similar to how the roulette wheel is rotated. Selection of an individual pie is then equivalent to choosing randomly a point on the wheel and determining the corresponding pie. For simple search algorithms, such a location requires operations while the binary search needs .

Stochastic Acceptance algorithm: A fast algorithm for Roulette wheel seelction is introduced based on Stochastic Acceptance [6]. The algorithm has complexity.

Let = max is the maximal fitness in the population. The algorithm consists of the following steps:

  1. Select randomly an individual (say, ) with uniform probability (1/).

  2. The selection is accepted with probability . If not accepted, the procedure is repeated from step 1.

Interested readers may see more details in the original paper [6].

2.2 An Application to Peer Selection

The random peer selection problem, which is described in Section 1.1, is equivalent to the Roulette wheel selection problem. The weight is the participants’ stakes in PoS peer selection, and is equivalent to the fitness value in Roulette wheel selection. The probability of selection of a peer in PoS is proportional to stake value , whereas that probility of selection of an individual in GA is proportional to its fitness value. Like roulette selection, peer selection also aims to prevent loss of diversity and to avoid any single peer from dominating the population.

We have implemented the Stochastic Acceptance algorithm [6] in Go. Our initial experiments with the implementation have shown that the algorithm runs quite fast. The benchmarking result, depicted in Figure 3 of their paper [6], shows that their algorithm is significantly faster than the search-based alternatives. The algorithm is promising to speed up peer selection in PoS systems.

3 Conclusion

We have shown that the peer selection problem in Proof of Stake consensus protocols is equivalent to Roulette wheel selection problem. Further, we have proposed to use a fast Roulette wheel selection algorithm [6] to achieve complexity, for peer selection in PoS systems. The established connection will enable several potential directions for future work in blockchain technologies.

4 Reference