Skip to content

EVMTXGun Non-EVM Destination Support#1147

Open
Farber98 wants to merge 7 commits into
mainfrom
juan/evm-load-gun-nonevm-support
Open

EVMTXGun Non-EVM Destination Support#1147
Farber98 wants to merge 7 commits into
mainfrom
juan/evm-load-gun-nonevm-support

Conversation

@Farber98
Copy link
Copy Markdown
Contributor

@Farber98 Farber98 commented Jun 2, 2026

Summary

Extends EVMTXGun so EVM source load tests can target V3 AltVM destinations without family repos or adding family specific logic to CCV.

Today the gun assumes every destination has a deployed mock_receiver in the CLDF datastore and always serializes EVM shaped extra args. This causes issues with cross-family lanes, which need BuildV3ExtraArgs and a receiver from the destination chain impl.

Why

Reuse one gun for all EVM-source lanes: EVM→EVM behavior is unchanged; EVM→AltVM should be additive behind destination detection.

What changed

  • EVMTXGun: destination-aware receiver resolution and extra-args encoding
    • EVM dest (mock_receiver in datastore) → existing EVM extra-args path
    • V3 AltVM dest → BuildV3ExtraArgs; execution defaults from destination via V3DestinationLoadDefaults
  • V3DestinationLoadDefaults: optional interface so destination impls supply load-test MessageOptions without CCV knowing family specifics
  • EnsureWETHBalanceAndApproval: shared WETH deposit + router approval for load senders (chain.Users + DeployerKey)
  • load_test: fund each EVM source once on the test goroutine before wasp workers start
  • Send behavior: token validation stays enabled (WETH fees require msgValue=0)

Out of scope for now

  • Token-transfer load profiles
  • Staging TOML mesh with AltVM destinations (verifyTestConfig + cross-family impl loading in TestStaging)

@Farber98 Farber98 marked this pull request as ready for review June 2, 2026 19:26
@Farber98 Farber98 requested a review from a team as a code owner June 2, 2026 19:26
Copilot AI review requested due to automatic review settings June 2, 2026 19:26
Copy link
Copy Markdown
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

Extends the EVMTXGun E2E load-test “gun” to support EVM-source lanes targeting non-EVM (V3) destinations by resolving receivers and encoding extra-args based on the destination’s capabilities, while also extracting WETH/router load-prep into a shared helper.

Changes:

  • Make EVMTXGun destination-aware for receiver selection and extra-args encoding (EVM mock_receiver vs V3 destination impl).
  • Extract WETH funding + router approval into EnsureWETHBalanceAndApproval (load_prep.go) and update load tests to use it.
  • Add V3DestinationLoadDefaults interface to allow destination implementations to provide load-test defaults (e.g., execution gas limit).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
build/devenv/tests/e2e/load_test.go Removes inlined WETH prep and switches to shared helper.
build/devenv/tests/e2e/load_prep.go Adds shared WETH deposit + router approval helper for load tests.
build/devenv/tests/e2e/gun.go Adds destination-aware receiver resolution/extra-args building; updates send options.
build/devenv/cciptestinterfaces/extra_args.go Introduces optional interface for destination-provided V3 load defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build/devenv/tests/e2e/gun.go
Comment thread build/devenv/tests/e2e/load_prep.go Outdated
Comment thread build/devenv/tests/e2e/load_prep.go Outdated
Copy link
Copy Markdown
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread build/devenv/tests/e2e/load_test.go Outdated
Comment thread build/devenv/tests/e2e/load_prep.go
Comment thread build/devenv/tests/e2e/gun.go Outdated
Copy link
Copy Markdown
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread build/devenv/tests/e2e/load_prep.go
Copy link
Copy Markdown
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread build/devenv/tests/e2e/load_prep.go Outdated
Comment thread build/devenv/tests/e2e/load_prep.go
Copy link
Copy Markdown
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread build/devenv/tests/e2e/load_test.go
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code coverage report:

Package main juan/evm-load-gun-nonevm-support Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 49.31% 49.33% +0.02%
github.com/smartcontractkit/chainlink-ccv/bootstrap 54.14% 54.14% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 15.54% 15.54% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 56.54% 56.54% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.97% 45.97% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 37.73% 37.67% -0.06%
github.com/smartcontractkit/chainlink-ccv/integration 46.13% 46.23% +0.10%
github.com/smartcontractkit/chainlink-ccv/pkg 84.62% 84.62% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.06% 63.06% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 34.48% 34.48% +0.00%
Total 46.50% 46.50% +0.00%

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.

2 participants