Why wait for 320 rounds after transferring the stakes

I created a private network with two nodes, node-1 having 100% of the stake and node-2 having 0%.
I started the network and then transferred the 100% stake from node-1 to node-2. But even after this, it is only the node-1 that is creating the blocks till the round 320 from the point when we transferred the stakes.
Why is this happening?

1 Like

The consensus protocol uses the account table from 320 rounds before the current round to perform the sortition.

At a high-level, this is to ensure:

  1. that Algorand does not fork.
  2. that an adversary controlling x% of the online stake (with x<20%) will only propose around x% of the blocks (they can propose a bit more but they definitely cannot propose all the blocks)

Let me show you one attack that would allow an attacker with, say 2M Algos, to propose all blocks, if the current account table is chosen (even without controlling the network).
2M Algos is less than 1% of the online stake so such an attack should produce very few blocks normally.

The attacker does the following.
They create 10M accounts with 0.1 Algos that they register to participate.
They also create 1 big account with the remaining Algos (about 1M).

Suppose they are the block proposer of round r.
They simulate in their head sending the 1M Algos to each of the small accounts and computing the VRF value. With high probability, sending the 1M Algos to one of the small accounts would make this small account the block proposer. They choose this transaction and put it in the block.

Now, they are block proposer for round r+1 and can continue the attack to always be block proposer.

Why will they most likely systematically find such a transaction making them block proposer?
Because a 1M account has currently more than 0.5% of chance to be block proposer.
But they are trying 10M times!


Why does forcing to look back 320 round solve this issue?
Because you cannot simulate that far unless you control the network.
This is due to the way the “seed” (input to VRF/sortition) is computed.

In other words, you cannot now at round r what transaction will be helpful at round r+320 to become block proposer.

3 Likes