7

What problem do epochs in staking solve? Why don't stakers win stakes by something as simple as generating data from history + the latest block (so that precomputing stakes is not possible), and then the longest chain wins (something like peercoin with stake-modifier).

I'm having trouble understanding how epochs (the idea that leaders/producers are elected in sections of times using some VRF). Can someone please explain the security benefit to doing this?

1 Answer 1

3

In a proof-of-stake protocol there are usually two distinct categories of systems for determining the eligibility of a given validator to issue a block:

  • Computed publicly by performing some computation that is repeatable by everyone else and thus verifiable (Peercoin falls into this category AFAIK)
  • Using a cryptographic system that involves a private-key computation and a public-key verification (BABE falls into this category using VRFs)

The advantage of the latter system is that since the computation for eligibility is not public (i.e. only the owner of the private-key can do it), it is harder for adversaries to corrupt the protocol since they cannot predict whether a given validator will be eligible to author the next block or not.

Epochs are used to collect entropy from VRF outputs, this entropy is then used on a future epoch as a seed for the VRF (https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html, https://polkadot.network/blog/polkadot-consensus-part-3-babe/). This is also the reason why a closed validator set is a requirement.

8
  • 1
    Thank you for trying to answer. Sorry for being picky, but this doesn't really answer my question. An answer would be "without epochs, x would happen (which was shown there in that source, y), and hence a possible solution is epochs, which does z to ensure that x problem doesn't happen. Jun 29, 2022 at 6:14
  • I have updated my answer, I'm not an expert on Peercoin but I think this is the main distinction between both systems and why epochs are needed in our setup.
    – André
    Jun 29, 2022 at 11:46
  • 1
    Thank you for explaining further. If you don't mind, why would an adversary be waiting for a staker to be eligible for block production instead of being there all the time with full control? Is this about DDoS attacks? If yes, if multiple people are competing to produce blocks, doesn't that mean that by definition only one will win and that every other secret will be revealed even though the corresponding blocks didn't win because they were broadcast? Doesn't that open the door for any attacker again since all the secrets are on the table after failing to produce main-chain blocks? Jun 29, 2022 at 12:20
  • 1
    I see. This is very valuable, thank you. So basically no one has to reveal the private key at any stage after publishing the block, yet it's possible to verify that every output of that RNG/VRF function came specifically from that private key by using the public key. Am I getting this right? Jun 29, 2022 at 18:20
  • 1
    Thank you very much. I'll mark this question as answered and ask any follow up questions in another one. Jun 30, 2022 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.