Skip to content
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

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

ferglor
Copy link
Collaborator

@ferglor ferglor commented Feb 23, 2024

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

Start(context.Context) error
Close() error
}

type LogEventProviderConfig struct {
NumLogUpkeeps uint32
FastExecLogsHigh uint32
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing FastExecLogsLow

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

@ferglor ferglor merged commit c9d7b3c into main Mar 4, 2024
8 of 9 checks passed
@ferglor ferglor deleted the feature/AUTO-9023 branch March 4, 2024 12:26
Copy link
Collaborator

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?

Copy link
Collaborator Author

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?

ferglor added a commit that referenced this pull request Mar 4, 2024
ferglor added a commit that referenced this pull request Mar 4, 2024
ettec pushed a commit that referenced this pull request Mar 28, 2024
ettec pushed a commit that referenced this pull request Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants