# How to model randomness in validators selection in PoS?

I searched a lot here and on the Internet to figure how how randomness selection of validators in PoS works? I understand it is a random selection based on fraction of stake a validator has, similar to PoW.

In PoW, we can model block arrival as a possion process. E.g., if block interval is 10 seconds,, we expect on average a block to be created each 10 seconds. You can get two blocks where the time between them less than a second (hence memoryless process). The chance each miner has for each block depends on its hash power fraction, but random in terms of assigning miners to blocks.

Now, how block arrival and assignment differs in PoS? from what i think is the same as in PoW. From other sources, i read time is divided into slots, where each slot is assigned to a validator (say deterministic). But not really understand how this differs from PoW. Any plain English explannation is appreciated (without too much technical details).

I understand it is a random selection based on fraction of stake a validator has, similar to PoW.

Not correct. In PoW, any miner can mine the next block. In PoS, a specific validator is chosen by the protocol that has the right to form/propose the next block.

The chance each miner has for each block depends on its hash power fraction, but random in terms of assigning miners to blocks.

The first part is correct that the chance a miner has depends on the hash power fraction. However, no miner is 'assigned.' Any miner can form the next block in the blockchain provided the block is valid and its header hash meets the target requirements.

How block arrival and assignment differs in PoS?

There is no one protocol set in stone that determines how the next block validator is chosen. (1) Peercoin (the first coin to implement PoS consensus along with PoW) used coin age (no. of coins x no of days the coins are in the wallet) to determine the next validator. (2) Then there is a hash selector (Ouroboros Praos protocol) wherein you take the current date and time, sign it with your private key and then check if it is less than the difficulty target. If yes, you are selected as the next validator. (3) There was one method where the randomness of the next block will depend on the signature of the current block (this method is now defunct due to potential vulnerabilities.)

• Thanks for the comment! just to clear second point i mean in PoW there is a way to select a miner for each block, the lucky one who found the nonce. In PoS, let assume we have three validators V1,V2 and V3, each controls 1/3 of total stake. Now, when blocks will be generated? and who generated each of them? if difficulty is to target a block each 10 seconds. Should be similar to PoW, where you might see two blocks happened just after each other (but for long run average between blocks is 10 seconds). Also, for long run will V1 will have created 1/3 of total blocs? Thanks
– MWH
Apr 4, 2019 at 9:27
• There is no miner selection. One who finds the solution to a valid block mines it. In PoS, a validator is chosen, and he is the only one that is allowed to propose/form the next block (unless Ouroboros Praos protocol). In BFT-style PoS, validators are randomly assigned the right to propose blocks, but agreeing on which block is canonical is done through a multi-round process where every validator sends a "vote" for some specific block during each round, and at the end of the process all (honest and online) validators permanently agree on whether or not any given block is part of the chain. Apr 4, 2019 at 9:40
• Thanks it is getting better. Yet, still not clear for me when blocks are generated, either at fixed point of time each 10 s or random point of time (but on long run average of 10s is achieved, like PoW). It seems to me PoS also affected by stale rate e.g., if V1 was selected to create B1 (where refers to genesis block) at time=10; and send B1 to other nodes, and then V2 was selected to create a block at time=20, but V2 has not yet heard of B1 that was sent by V1. In this case, V2 will create a block referring to the genesis block. At the end, one of these blocks will be discarded. Is it true?
– MWH
Apr 4, 2019 at 10:44
• If you want to keep the block time at 10 sec, the protocol selects the next validator at ~10 sec. In case of conflicts, it is resolved via voting. Different validators bet on the accepted block. The winning block is the one that receives the most votes; votes are weighted by holdings, Apr 4, 2019 at 18:09