update common repo; apply patch of e9e903bf4b34099f8b274eb1e0f013b4ab… #684
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
Update the dependencies so new features can be developed in
chainlink-common
. This means reconciling the interfaces in this repo with the updated definitions in common. The drift wasctx
anderr
handling.Solution
The repo was behind a number of change in core & common. It was impossible to only bump common and then tweak ccip code.
Instead I found all the changes in common that have propagated to core and required here to compile, created a
patch
for each of them, and applied the patches. This was straightforward but annoying.Beyond plumbing
ctx
anderror
there was one significant change in the interfaces -- Close'ing and how that is intertwined with logpoller filters.gRPC can't understand pg.Opts. It is not possible to maintain the existing
Close
signature, which was a thin wrapper aroundlogpoller.UnregisterFilter()
. However, it is required thatClose
exist so that resources can be freed on the server.The simplest path forward was to extract the existing behavior of
Close
into a standalone funcUnregisterFilters
. Given thatClose
signature changed, it's easy to ensure that all the call sites are correctly modified to callUnregisterFilters
in addition toClose
.This solution is not pretty, but it is sufficient, and
pg.Opts
has to be removed in the near future to be compatible with EVM extraction.