-
Notifications
You must be signed in to change notification settings - Fork 14
OEV-699 Introduce relayConfig.GasLimit to override gas limit on job level #302
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
Conversation
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.
Pull request overview
This PR introduces the ability to configure gas limits at the job level through relayConfig.GasLimit, providing a higher-precedence override than existing configuration options. This enables specific feeds (like SVR and L2EP) to use custom gas limits without conforming to global settings.
Key Changes:
- Added
GasLimitfield toRelayConfigstructure with highest precedence in the gas limit hierarchy - Extracted gas limit resolution logic into a dedicated
getGasLimitFromfunction for better testability - Added comprehensive test coverage for all gas limit precedence scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/config/types.go | Added GasLimit field to RelayConfig struct with documentation |
| pkg/config/types_test.go | Extended test to verify GasLimit field serialization/deserialization |
| pkg/transmitter/util.go | Refactored gas limit logic into getGasLimitFrom function and added relay config gas limit support |
| pkg/transmitter/util_test.go | Added comprehensive unit tests for gas limit precedence logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use different chainlink-ccv/go version to make make tidy work
…g.GasLimit -> opts.PluginGasLimit
This reverts commit 2ca8e45.
* OEV-699 WIP: forward job.GasLimit to Transmitter for OCR2 median jobs * Fix test * Set gas limit on the median config * Tested with an actual gas limit on a job * Remove test output * Add changeset * Improve log message * Add tag to changeset * Add check to install protoc script (seems to fail) * Revert "Add check to install protoc script (seems to fail)" This reverts commit 5c6996d. * Remove erroneous log message * Don't override gasLimit if already set * Add test for overriding gas limit * Bit of cleanup * Reformat * Run golangci-lint-v2 * Inline * Just use pluginConfig.GasLimit directly * Add unit test * Remove old test * Move test-specific mocks into their specific test * Use setupMocksAndRelayer() in the test * Use setupMocksAndRelayer only in the added test * Move gasLimit to RelayConfig instead (smartcontractkit/chainlink-evm#302) * Revert a bit more * Update changeset * Use chainlink-evm commit hash (not merged yet) * Revert "Use chainlink-evm commit hash (not merged yet)" This reverts commit 956804b. * Use smartcontractkit/chainlink-evm#302 for chainlink-evm Use different chainlink-ccv/go version to make make tidy work * Revert "Use smartcontractkit/chainlink-evm#302 for chainlink-evm" This reverts commit 2ca8e45. * Use latest chainlink-evm (specifically, smartcontractkit/chainlink-evm#302)
OEV-699: Make it possible to set the gas limit per feed.
We want to do this for SVR and L2EP feeds specifically, so that they don't need to conform to the global gas limit.
There's support on the transmitter side for setting a custom gas limit here.
This is used for e.g. Automation to set gas limit per Product.
With this change, we can now also set gas limit per job.
Supports
smartcontractkit/chainlink#20386
Notes