HeadTracker finalization support
- Mark block finalized based on FinalityTag or FinalityDepth
- Add to Head function that returns LatestFinalizedHead in the chain
- Previously, we've kept only
historyDepthblocks in the cache. Such logic could have lead to redundant RPC calls on a chain with finalityTags ifhistoryDepthwas smaller than the actualfinalityDepth.To address this issue, we only trim blocks that are older thanlatestFinalized - historyDepth
I see that you haven't updated any README files. Would it make sense to do so?
I see that you haven't updated any CHANGELOG files. Would it make sense to do so?
The changes look great!
I have one question. Where do we regularly look for new Finalized Heads? Couldn't find that logic.
In the backfillLoop https://github.com/smartcontractkit/chainlink/blob/2f554038673dadf413a0f8f4ce1321a0678d904a/common/headtracker/head_tracker.go#L305
Can you update the CHANGELOG stating that we've added Finality Tag support on the Head Tracker, but consumers will actually utilize it on a separate PR?
Can you update the CHANGELOG stating that we've added Finality Tag support on the Head Tracker, but consumers will actually utilize it on a separate PR?
Is not it too internal to be mentioned in the CHANGELOG? I recall foundations asking me to remove similar entry.
Also technically TXM uses FinalityTag feature right away, if it's enabled for the chain, as now we backfill heads up to tagged block instead of finality depth.
I agree that we need to somehow communicate the change. I'm not sure that CHANGELOG is suitable for it.
Can you update the CHANGELOG stating that we've added Finality Tag support on the Head Tracker, but consumers will actually utilize it on a separate PR?
Is not it too internal to be mentioned in the CHANGELOG? I recall foundations asking me to remove similar entry. Also technically TXM uses FinalityTag feature right away, if it's enabled for the chain, as now we backfill heads up to tagged block instead of finality depth. I agree that we need to somehow communicate the change. I'm not sure that CHANGELOG is suitable for it.
This is a public PR so I don't see why this shouldn't be mentioned 😅 . Can you dm me the example? Regarding finality, TXM still uses FinalityDepth to mark transactions as finalized, so it doesn't fully utilize the finalized blocks even if they are stored in the HeadTracker.
Quality Gate passed
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
80.6% Coverage on New Code
0.0% Duplication on New Code