Skip to content

Conversation

@cll-gg
Copy link
Contributor

@cll-gg cll-gg commented Nov 26, 2025

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

@cll-gg cll-gg changed the title Add gas limit OEV-699 Introduce relayConfig.GasLimit to override gas limit on job level Nov 26, 2025
cll-gg added a commit to smartcontractkit/chainlink that referenced this pull request Nov 26, 2025
@cll-gg cll-gg requested a review from Copilot November 26, 2025 13:32
Copy link
Contributor

Copilot AI left a 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 GasLimit field to RelayConfig structure with highest precedence in the gas limit hierarchy
  • Extracted gas limit resolution logic into a dedicated getGasLimitFrom function 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.

@cll-gg cll-gg marked this pull request as ready for review November 26, 2025 13:33
@cll-gg cll-gg requested a review from a team as a code owner November 26, 2025 13:33
cll-gg added a commit to smartcontractkit/chainlink that referenced this pull request Nov 26, 2025
Use different chainlink-ccv/go version to make make tidy work
@cll-gg cll-gg merged commit b25db0b into develop Nov 27, 2025
33 checks passed
@cll-gg cll-gg deleted the OEV-699-add-gaslimit-to-relay-config branch November 27, 2025 10:30
cll-gg added a commit to smartcontractkit/chainlink that referenced this pull request Nov 27, 2025
cll-gg added a commit to smartcontractkit/chainlink that referenced this pull request Nov 27, 2025
github-merge-queue bot pushed a commit to smartcontractkit/chainlink that referenced this pull request Nov 27, 2025
* 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)
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.

3 participants