-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config cache #551
Config cache #551
Conversation
) | ||
|
||
return contractreader.ExtendedBatchGetLatestValuesRequest{ | ||
consts.ContractNameOffRamp: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth adding some warning comment that changing the order will fail the processing function. I suggest adding some unit test to make sure that the order doesn't change as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order here is not important. The processing is happening in a for loop with a switch statement. So even if the order changes, we would still be able to process the batched result correctly.
|
This PR modifies the CCIPChainReader to use a cache layer for static configuration data. Instead of making contract calls for each configuration request, static data like offramp config, RMN config, and fee quoter config is now cached with a configurable refresh period.
The
OnRampGetDynamicConfig
andOnRampGetDestChainConfig
are called from the src chain, so cannot be batched. We can eventually cache them (probably in an upcoming PR).