filecoin-project / go-f3

Golang implementation of Fast Finality for Filecoin (F3)
Apache License 2.0
12 stars 7 forks source link

Set the default EC lookback to 4 #716

Closed Stebalien closed 4 weeks ago

Stebalien commented 1 month ago

That will significantly reduce the chance that F3 causes EC to fork.

Stebalien commented 1 month ago

Discussed this with @jennijuju and I'm now more convinced we should just set it to something like 10. That means about a 5m delay, but that'll still get us finality in 6-7 minutes.

masih commented 1 month ago

That means about a 5m delay, but that'll still get us finality in 6-7 minutes.

I would really like to avoid increasing time to finality if we can help it. Can we discuss this further at standup today please?

Stebalien commented 1 month ago

Of course. I'd definitely like to avoid it, I'm just worried because 2-3 length reverts aren't uncommon.

Stebalien commented 1 month ago

We discussed this and have settled on 4 epochs (2 minutes) based on:

  1. The longest forks we saw were 3 blocks, but most were 1/2 blocks.
  2. Forks longer than 4 blocks are likely due to the local node being on a strange fork. The only thing we're concerned about is the entire network switching and having the entire network do a 4 block revert is unlikely unless the network is really unhealthy.
  3. Smaller delays likely have diminishing returns. With a 4 epoch lag, we'll likely come to consensus in a single round (likely less than 30 seconds, definitely less than a minute). We can almost certainly go faster, but we can easily revisit this later as it isn't consensus critical: everyone should try to start instances at the same time anyways, some participants will just propose longer/shorter chains each time.