* Implement ticket based F3 participation lease
Implemented enhanced ticket-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tickets grant a temporary lease, allowing storage
providers to sign as part of the F3 consensus mechanism. This design ensures that
tickets are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing ticket. If the ticket is invalid or expired,
miners are directed to obtain a new ticket via
`F3GetOrRenewParticipationTicket`.
Fixes https://github.com/filecoin-project/go-f3/issues/599
* Use fresh timer every time for F3 backoffs
To avoid potential of deadlock in case f3Participator is used from
multiple goroutines use throw-away timers at the price of higher GC.
Also use the cancel function in context explicitly in a unified stop
hook that awaits the participation to end before exiting.
* Strictly require start instance to never decrease
Require the start instance of a participation to never decrease if there
is an existing lease by the miner.
* feat(f3): update go-f3 to 0.7.0 and adapt for changes to the API
* feat(f3): Include the network name in the lease
That way we don't re-use leases across networks. It's a bit racy (we ask
for the manifest before we ask for the current progress) but it should
be fine because at least we won't create a lease for the new network
with a future instance.
There's still an ABA problem if we rapidly switch back and forth between
two networks but... let's just not do that? At least for the mainnet
switchover, that won't be an issue because we enforce a 900 epoch
silence period.
I have to say, I'm not happy about this. But... we can probably just
hard-code it in the future once we get rid of the dynamic manifest.
* Handle not ready error gracefully in participator
Back off and get a fresh token if F3 is not ready.
---------
Co-authored-by: Steven Allen <steven@stebalien.com>