Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major update in EC and Secret Leader Election Specification #1054

Closed
wants to merge 2 commits into from

Conversation

yiannisbot
Copy link
Collaborator

This PR is applying all the latest changes in the Expected Consensus, Leader Election and the rationale behind Poisson Sortition of WinCount. It removes all mention of Election PoSt which was very out-of-date.

@yiannisbot yiannisbot requested review from irenegia and nicola August 10, 2020 19:54

This is modelled via a Binomial distribution with parameter`p=ExpectedLeaderPerRound/TotalPower` and `n= MinerPower`.

For ease of implementation, we use the the Poisson distribution with parameter `lambda = MinerPower*ExepectedLeader` to approximate this Binomial distribution.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say Poisson is an approximation for ease of implementation. I initially thought Binomial(ExpectedLeadersPerRound, MinerPower/TotalPower) was the "correct" or ideal distribution, but after much discussion with @jzimmerman, I came to realize this: since every miner is rolling uncorrelated/independent dice, and we want to be fully invariant to miner pooling (not just in expectation), Poisson is actually the ideal distribution.

The table below might still be worth presenting, but the framing should be something like "you might think binomial is better, but it isn't, but look, it doesn't matter much anyway" rather than "our approximation is good enough".

- Compute the probability distribution of winning `k` blocks (i.e. Poisson distribution see below for details)
- Let `h_n` be the normalised VRF, i.e. `h_n = vrfout/2^256`
- The probability of winning one block is `1-P[X=0]`, thus if `h_n` is less than `1-P[X=0]`, the miner wins at least one block.
- Similarly if `h_n` is less than `1-P[X=0]-P[X=1]` we have at least two blocks and so on.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might add: "While it is not permitted for a single miner to publish two distinct blocks, in this case, the miner produces a single block which earns two block rewards."


Filecoin is building on the principle that a miner possessing X% of network power should win as many times as X miners with 1% of network power in the election algorithm.

This is modelled via a Binomial distribution with parameter`p=ExpectedLeaderPerRound/TotalPower` and `n= MinerPower`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to pick an intuitive Binomial model to compare to, IMO the most intuitive is n=ExpectedLeadersPerRound and p=MinerPower/TotalPower

@yiannisbot
Copy link
Collaborator Author

@davidad due to several conflicts after merging #967 into beta, I have rebased my changes on top of the new branch and addressed your comments in #1066. Closing this PR - discussion continues in #1066

@yiannisbot yiannisbot closed this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants