filecoin-project / go-f3

Golang implementation of Fast Finality in Filecoin (F3)
Apache License 2.0
9 stars 6 forks source link

Use available information when computing the next instance start #720

Open Stebalien opened 1 day ago

Stebalien commented 1 day ago

We currently try to get the recently finalized head tipset:

https://github.com/filecoin-project/go-f3/blob/5fc96af6b505faa6cc254bcf1de772378edf6aeb/host.go#L349-L354

However, if it's on a fork, we may not have it. Instead, we should get our current head and use the finalized head's epoch, our head epoch, our head timestamp, and the EC period to compute the correct delay.

Kubuxu commented 1 day ago

Error log:

ERROR   f3      go-f3@v0.7.0/host.go:352        could not get timestamp of just finalized tipset: getting tipset by key: 
    github.com/filecoin-project/lotus/chain/lf3.(*ecWrapper).GetTipset 
        /home/filoz/lotus/chain/lf3/ec.go:87 
  - getting tipset from key: 
    github.com/filecoin-project/lotus/chain/lf3.(*ecWrapper).getTipSetFromF3TSK 
        /home/filoz/lotus/chain/lf3/ec.go:239 
  - get block bafy2bzaceaqmxljdyz2n5yj65ajnremgtrv64mysbhnikoovjqjtkbpcxdhto: 
    github.com/filecoin-project/lotus/chain/store.(*ChainStore).LoadTipSet.func1 
        /home/filoz/lotus/chain/store/store.go:886 
  - ipld: could not find bafy2bzaceaqmxljdyz2n5yj65ajnremgtrv64mysbhnikoovjqjtkbpcxdhto