When to start an f3 instance
Closed this issue · 5 comments
Once an f3 instance terminates, we need to determine when the next one starts. This decision will influence the head input chain offset #175 (waiting longer increases likelihood of preagreement on start for a particular head input offset).
A decision was made to wait for some delay after the timestamp of the last finalized epoch by the terminated f3 instance - parameter to be decided for FIP.
For the moment, let us assume to wait 2 epochs from the timestamp of the latest finalized epoch. That is, a participant, on termination of an f3 instance:
- looks at the epoch
$e$ of the head of the newly finalized prefix. - looks at the current epoch
$e'$ - if
$e'-e>= 2$ then start immediately. Otherwise, wait until epoch$e+2$ starts, i.e. until$e'=e+2$ , to start a new f3 instance.
This is in pair with the decision for #175 to suggest as proposal for the new instance the current EC heaviest chain from baseChain up until the second head (i.e. removing the head tipset from the proposal), but suggesting at least the tipset from epoch e+1.
TL;DR: will tell go-f3 when to start which may be "now" or at some future time T when we expect the next block.
However, if we see an "empty" instance, we need to make sure we don't start racing. Either:
- Add some kind of exponential backoff.
- Wait until
LastTipsetTime + BlockTime * EmptyInstanceCount
.
(work here will happen in the client, which will feed it into the f3