Skip to content

Unify finalized tipset resolution: ChainGetFinalizedTipSet and TipsetTag::Finalized should use the same source of truth #6791

Description

@coderabbitai

Summary

ChainGetFinalizedTipset (Filecoin.ChainGetFinalizedTipSet) and the TipsetTag::Finalized code path in ChainGetTipSetV2::get_latest_finalized_tipset currently use different sources for the F3 finalized tipset:

  • ChainGetFinalizedTipset makes a live call to F3GetLatestCertificate::get()
  • get_latest_finalized_tipset reads from the ChainStore cache via ctx.chain_store().f3_finalized_tipset()

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

Goal

Route both through the same source of truth (the ChainStore-cached f3_finalized_tipset()), preserving the existing fallback to get_ec_finalized_tipset when the cached F3 finalized tipset is absent or too old.

References

/cc @hanabi1224

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions