Skip to content

fix: unify finalized tipset resolution between ChainGetFinalizedTipSet and ChainGetTipSetV2 #6792

Description

@coderabbitai

Summary

ChainGetFinalizedTipset (Filecoin.ChainGetFinalizedTipSet) currently resolves finality by making a live F3GetLatestCertificate::get() RPC call, while ChainGetTipSetV2::get_latest_finalized_tipset (used for TipsetTag::Finalized in the V2 API) reads from the ChainStore-cached f3_finalized_tipset() introduced in PR #6780.

These two public RPCs can return divergent finalized tipsets during startup, after a cache reset, or whenever the F3 sidecar is temporarily unavailable.

Proposed Fix

Route ChainGetFinalizedTipset through ChainGetTipSetV2::get_latest_finalized_tipset (the shared helper) so both paths use the same source of truth, with the existing fallback to EC finality preserved.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions