Skip to content

Commit b3b7727

Browse files
authored
fix(f3): handle a case where we might receive no manifest (#12579)
In _theory_ a lotus node can return no manifest from `F3Manifest`. I don't think that happens in practice but we should handle the case and start over at the top (try to get another lease). If we really have no manifest, lotus will tell us that F3 isn't ready yet and we'll backoff for a bit.
1 parent 4ef0aed commit b3b7727

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

node/modules/storageminer.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,11 @@ func (p *f3Participator) awaitLeaseExpiry(ctx context.Context, lease api.F3Parti
491491
}
492492
log.Errorw("Failed to check F3 progress while awaiting lease expiry. Retrying after backoff.", "attempts", p.backoff.Attempt(), "backoff", p.backoff.Duration(), "err", err)
493493
p.backOff(ctx)
494-
case manifest.NetworkName != lease.Network:
494+
case manifest == nil || manifest.NetworkName != lease.Network:
495+
// If we got an unexpected manifest, or no manifest, go back to the
496+
// beginning and try to get another ticket. Switching from having a manifest
497+
// to having no manifest can theoretically happen if the lotus node reboots
498+
// and has no static manifest.
495499
return nil
496500
}
497501
switch progress, err := p.node.F3GetProgress(ctx); {

0 commit comments

Comments
 (0)