filecoin-project / consensus

Filecoin consensus work
Other
42 stars 5 forks source link

Effect on progress of offline miners #69

Closed anorth closed 5 years ago

anorth commented 5 years ago

During the 0.2.1 devnet release, a crash bug caused a large amount of miner power to go offline at around the same time. During this period, we observed extremely slow network progress (although there was another issue also contributing to that).

While perhaps unlikely, what is the expected behaviour in this situation? Is progress expected to be proportional to the amount of mining power that is actually attempting to mine blocks? Are there mechanisms other than foregone block rewards to guarantee progress?

See some [discussion in slack] (https://filecoinproject.slack.com/archives/CEHHJNJS3/p1557367076276300)

Please forgive and redirect me if this isn't the right forum for the question.

sternhenri commented 5 years ago

This is indeed the right forum. I expect @whyrusleeping and @ZenGround0 will have thoughts as well.

The short answer is that block time remains 30 seconds (or X) in all cases, but expected progress will decrease if some sizeable portion of the network goes offline for a time (as you saw) since it is more likely that null blocks be mined during that period.

Liveness is something that EC guarantees (ie eventual progress), and you would expect to see speed increase again as soon as the offline miners get slashed for not submitting proofs and that is reflected in the power table (ie max(proving period, power table lookback)). This could be on the order of a few thousand blocks (eg). Changing that number is doable but needs to be seen in the context of security implications (a good job for a network calculator @porcuquine).

A second avenue might be for us to add some other sort of "difficulty" related to number of null blocks (as compared to expectation) to increase or decrease the expected number of winners in EC based on such events, but it would largely have the same effect on speed as the above (albeit potentially on shorter time scales), with potential security issues that may not be worth the trouble (I'm thinking about selfish mining here or general coalition forming, eg)...

Does that answer your question @anorth ?

anorth commented 5 years ago

I think so, let me try to restate things.

In the near term we expect the block reward to be sufficient incentive. When block reward drops, we expect gas fees to provide that incentive, priced by the gas market.

sternhenri commented 5 years ago

I have some nit comments about some of what you've said, but in general we're on the same page.

Now for the nit:

In the near term we expect block rewards to suffice, in the long term, we expect fees (not just gas fees but also transaction fees) to make up for it yes. Though I personally don't know much about gas in FIL.

whyrusleeping commented 5 years ago

+1 to @henri's repsonses. Also note, this effect is not unique. If half the bitcoin network drops off, blocks will take twice as long to mine until the difficulty adjustment (once every two weeks).

anorth commented 5 years ago

Thanks