This repository was archived by the owner on Mar 14, 2025. It is now read-only.
CCIP-1184 Reduce number of logs to be scanned when checking for cache staleness #287
Merged
mateusz-sekara merged 3 commits intoccip-developfrom Nov 21, 2023
Merged
CCIP-1184 Reduce number of logs to be scanned when checking for cache staleness #287mateusz-sekara merged 3 commits intoccip-developfrom
mateusz-sekara merged 3 commits intoccip-developfrom
Conversation
a98a726 to
528c90d
Compare
dimkouv
reviewed
Nov 15, 2023
528c90d to
ce0d15e
Compare
dimkouv
suggested changes
Nov 16, 2023
dimkouv
approved these changes
Nov 16, 2023
|
|
||
| currentBlockNumber, err := c.logPoller.LatestBlockByEventSigsAddrsWithConfs(lastChangeBlock, c.observedEvents, c.address, logpoller.Confirmations(c.optimisticConfirmations), pg.WithParentCtx(ctx)) | ||
|
|
||
| // Ordering matters here, we need to fetch latestBlock, before we fetch logs. |
Collaborator
There was a problem hiding this comment.
hmm can you elabourate on the specific edge case? On a likely related note, I think it'd be much safer/easier to follow if we just use logpoller.Finalized instead of optimistic confs for LatestBlockByEventSigsAddrsWithConfs. Means we react a little slower to adding a new token but thats totally fine, then we dont have to think about reorgs at all here
Contributor
Author
There was a problem hiding this comment.
I made the comment more specific explaining the edge case scenario I had in mind. Also, I got rid of optimisticUpdates, we rely on finality here
d9f503a to
02b149f
Compare
5c4c9ea to
99a16de
Compare
connorwstein
approved these changes
Nov 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Solution