-
Notifications
You must be signed in to change notification settings - Fork 170
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
EC with multiple leaders #603
Comments
Proposed behaviors:
Places to look that have solutions we could rework
Throwaway idea
|
I would propose something simple:
The idea is that by authorizing multiple blocks per miner in a given round naively (1) changes the dynamics of the power table as shown in this issue and (2) from the chain perspective, when a miner wins two blocks in a given round, it's equivalent to having a double sized block from same miner. Which I believe is not what we'd like, we'd like a distribution of (single sized) block issuer according to the distribution of the power table --> the "behavior" i'm aiming at is: *at each round, each miner has a pr. of winning one block ("fixed" size) w.r.t. to his power". |
Both above comments are great. Adding comments from @Kubuxu :
=== back to HS, restating nikkolasg and zenground0's points: my sense of intended behavior is What is the intended behavior?
Proposal: Thereafter we may want to consider having some sort of quality metric for rewards as either @Kubuxu or @ZenGround0 discuss. |
The alternate proposal would just have us append an attempt number to the election to have e elections, so you would run this input through the VRF:
Every miner would publish one block regardless of how many times they win, but would earn block rewards proportional to number of wins. This would lead to fewer blocks per round than e on expectation, but disincentivizes sybiling. |
So if we're going on with the "1 block per miner per round" idea, but haven't fixed on the block reward yet, we might want to make sure we include the information early on "how much time have you been elected". This relates to the "quality metric rewards" but I find it much simpler to reason about a concrete number (if you've been elected 5 times, you get 5x rewards). I'm not sure about the block reward, didn't find it in the paper, but the idea of explicitly broadcasting the number of times an elected miner has been selected can allows us to try many variations of the block rewards (de/incentivizes sybils, etc) |
It will be a cleaner interface to the rest of the system if total block reward in a particular Epoch remains independent of e. If you mine more blocks, you get a bigger share of the total. I like multiple elections more than one single election multiplied by e. It seems fishy to have guaranteed winning when miner size exceeds 1/e. Multiple elections are basically binomial coin flips and the expectation on the times of winning is e * p where p is the fraction of total power. |
Yeah but that's a biased way to see this since "if you mine more blocks" depends on e already. I can turn things around and say "if you have won more, you get a bigger share of the total", that's the same reasoning, but both depend on e anyway. Given that (the fact that rewards depends on e), running only once a VRF avoids changing the statistics (see @sternhenri first post; basically gives you more chance to be selected), enables to fully utilize the network and more miners (more involvement since more chance to win a block compared to multiple block per miner), as well I'm afraid it increases the grinding surface - but it's just a fear, nothing concrete ^^) and is clear and simple. Just saying my opinion on the matter ;) |
@nikkolasg Not sure if we are on the same page, what im saying is that the total reward, say B, allocated for each Epoch should be independent of the number of miners who mined a block in that Epoch. If 10 miners mine a block, then each of them gets (B / 10) FIL but only B in aggregate. If 5 miners mine a block, then each of them gets (B / 5) FIL and B in aggregate. Individual reward at an Epoch still depends on e but the total doesnt. |
I think these are orthogonal points. You agree I believe :b |
Oh right, yes, no problem for doing that sorry for the confusion. |
To sum up, a few options (from @nikkolasg):
2a and 2b seem the most straightforward solutions that effectively separate rewards and sortition.
|
I think we can achieve the benefits of virtual Sybils without complicating the protocol by having multiple winning blocks per miner -- essentially, we would use the virtual Sybils to determine the number of "virtual blocks", which determines the miner's share of the epoch's total block reward; but in terms of actual blocks, there would still be at most one per miner. More precisely:
The analysis of the expectation holds not only for the whole network, but also for any would-be coalition; thus I believe the construction would not yield any advantage to coalitions, or conversely to Sybils, in terms of the expected return. Does that seem reasonable? |
Yes, this is what is proposed in 2a above using binomial instead of Poisson, and effectively what Algorand does. |
I propose a variant of 2b/c. Miner's eligibility for publishing a block is defined by:
Then after the miner won election, reward is defined by:
This counts how many times over the miner has won the election. It can be simulated using very simple matlab script: e = 10;
power = 0.15;
N = 100000;
draws = rand(N, 1);
req = e * power;
wins = max(ceil(req-draws),0); % if draw < req { win++; draw+=1 }
mean(wins) |
@Kubuxu Can't you do something similar without the |
We want |
This is the same reason |
I understand your point @nikkolasg: you keep the deterministic aspect with this solution. My question is why do we need |
@sternhenri if we don't do @nikkolasg I will look at it. |
We have to adjust for the fact that the first lottery has run, a miner was able to submit the block. Small miners should get the full reward for that, big miners might have a guaranteed reward + some. |
quoting from @Kubuxu " We can think of the result of it previously being set at 1. The ceil(req-draw) adjusts only when someones req > 1 , so he has more then 1/e power." Put another way:
Take a miner with 12%, e = 10;
|
edit: It is worth noting that with there could be more or less than targetRewardPerEpoch doled out in any given round, but targetRewardPerEpoch on expectation, with the exception that if there are enough large (> 1/e) miners there will be fewer than e blocks put out per round yielding less than targetRewardPerEpoch rewards per round. A fix would be to do: pro:
con:
I believe we should not do this. cc @zixuanzh |
@sternhenri Yes, i realized what i said yesterday was flawed but forgot to comment because it creates incentives to drop other miners' block or withhold blocks and only publish them later when the miner is confident that fewer miners have found a block at that Epoch so that they can get a bigger share. Similarly, we might not want to do Lets define the following, So in terms of realization, block reward per block will not always stay at |
Closing in favor of #610 |
How to do multiple leader election in EC? @ZenGround0 recently pointed out an issue that has been vastly overlooked in doing multiple leaders in EC.
Currently election validation is specced here but this code needs to be updated (along with the md file) to explicit how multiple leaders is done.
(In this issue, we use expected_number_of_leaders_per_round = e.)
The straw-man solution would have us do something simple, namely:
power_fraction * e < electionProof.Output
However, as @ZenGround0 points out this has unintended consequences, namely:
e.g. a 25% miner will deterministically win at every round for e >= 4.
Perhaps the intended system should be closer to running e independent leader elections, thereby making a 25% miner 68% likely to win at least once (
1-(1-.25)^4)
). But this also has issues:Two questions follow:
I am in favor of retaining the straw man at this time but this is a core question that has a wide impact on occurrence of null rounds as well as incentives and winning distribution, so I wanted to bring you in to opine before moving this to spec (by this Friday Nov 1).
The text was updated successfully, but these errors were encountered: