-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a SetConfig function to the LogEventProvider interface #367
Conversation
aa666d0
to
c545adf
Compare
Start(context.Context) error | ||
Close() error | ||
} | ||
|
||
type LogEventProviderConfig struct { | ||
NumLogUpkeeps uint32 | ||
FastExecLogsHigh uint32 |
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.
missing FastExecLogsLow
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.
i see this PR is merged but we might need changes based on comments on https://github.com/smartcontractkit/chainlink-automation/pull/314/files
12baaf4
to
6f30910
Compare
6f30910
to
6a784d1
Compare
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.
This is pretty unusual within our existing model. Is the point to be able to mutate the configuration along the way?
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.
@jmank88 Sorry, only seeing this now! So, we need a way to update the config of the LogEventProvider
, based on the config stored in the on-chain automation registry. Within libocr, we have code that listens for changes to the config on the registry, and when a change is detected, a new instance of the automation plugin is started with that new config.
Now, we want to be able to set configuration for the LogEventProvider
on the registry, and have a way to pass that config change from the registry, into the LogEventProvider
. To achieve this, we're utilising the existing libocr/automation functionality that listens for/propagates config changes, and we're setting the config on the LogEventProvider from within the automation plugin.
To facilitiate this, we're adding a SetConfig function to the LogEventProvider
interface in common, which the automation plugin can call, and pass the config into using the LogEventProviderConfig
. So the flow will be:
setConfig -> registry -> libocr -> chainlink-automation -> LogEventProvider.SetConfig(LogEventProviderConfig{})
Does that make sense?
)" This reverts commit c9d7b3c.
* Add setters and getters for config fields
https://smartcontract-it.atlassian.net/browse/AUTO-9023
In this PR, we're updating the LogEventProvider interface with a means of setting config values, internal to the log event provider implementation
Related PRs