Skip to content

Change CL node executor job distribution#943

Merged
carte7000 merged 13 commits intomainfrom
simon/devenv/test-executor-node-distribution
Mar 20, 2026
Merged

Change CL node executor job distribution#943
carte7000 merged 13 commits intomainfrom
simon/devenv/test-executor-node-distribution

Conversation

@carte7000
Copy link
Contributor

No description provided.

0xAustinWang
0xAustinWang previously approved these changes Mar 18, 2026
@carte7000 carte7000 marked this pull request as ready for review March 18, 2026 20:42
@carte7000 carte7000 requested review from a team and skudasov as code owners March 18, 2026 20:42
Copilot AI review requested due to automatic review settings March 18, 2026 20:42
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 adjusts executor job distribution so an executor can be configured to participate only in specific destination-chain executor pools, and updates coordinator logic/tests and CI smoke runs to support a “one executor per chain” mode.

Changes:

  • Add LeaderElector.IsExecutorForChain and update coordinator to skip messages for destination chains this executor doesn’t serve.
  • Relax validation/constructor behavior so an executor ID can be absent from some chain pools (with new unit tests reflecting this).
  • Add devenv/CI configurations and workflows to run smoke tests in “one exec per chain” setups.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
executor/interfaces.go Extends LeaderElector with IsExecutorForChain.
executor/pkg/leaderelector/hash_based_elector.go Implements IsExecutorForChain and removes per-chain membership validation.
executor/pkg/leaderelector/hash_based_elector_test.go Updates/extends tests for non-membership behavior and multi-selector indices.
executor/executor_coordinator.go Skips scheduling/execution when IsExecutorForChain is false.
executor/executor_coordinator_test.go Updates mocks for new method and adds a skip-path test.
executor/config.go / executor/config_test.go Removes “executor must be in every pool” validation and updates tests accordingly.
internal/mocks/mock_LeaderElector.go Regenerates mock to include IsExecutorForChain.
build/devenv/env-one-exec-per-chain-*.toml New env overlays mapping chains to specific executors.
build/devenv/env-cl-16.toml Alters committee node lists (now potentially inconsistent with thresholds).
.github/workflows/test-smoke.yaml / .github/workflows/test-cl-smoke.yaml Adds OneExecPerChain smoke matrix entries and separates display name from go test -run regex.
build/devenv/go.mod / build/devenv/go.sum Dependency bumps needed by the devenv tooling/tests.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 142 to 145
if len(chainConfig.ExecutorPool) == 0 {
return fmt.Errorf("executor_pool must be configured for chain %s", chainSel)
}
if !slices.Contains(chainConfig.ExecutorPool, c.ExecutorID) {
return fmt.Errorf("this_executor_id '%s' not found in executor_pool for chain %s", c.ExecutorID, chainSel)
}
}
Comment on lines 79 to 84
errs = append(errs, fmt.Errorf("executor pool for chain %d contains duplicate ID %q", chainSel, id))
break
}
seen[id] = struct{}{}
}
if !slices.Contains(ids, thisExecutorID) {
errs = append(errs, fmt.Errorf("this executor ID %q not found in executor pool for chain %d", thisExecutorID, chainSel))
}
interval, ok := executionIntervals[chainSel]
Comment on lines 94 to 96
[environment_topology.nop_topology.committees.default.chain_configs.3379446385462418246]
nop_aliases = ["node-0", "node-1", "node-2", "node-3", "node-4", "node-5", "node-6", "node-7", "node-8", "node-9", "node-10", "node-11", "node-12", "node-13", "node-14", "node-15"]
nop_aliases = ["node-1", "node-3", "node-5", "node-7", "node-9", "node-11", "node-13"]
threshold = 16
Comment on lines 98 to 100
[environment_topology.nop_topology.committees.default.chain_configs.12922642891491394802]
nop_aliases = ["node-0", "node-1", "node-2", "node-3", "node-4", "node-5", "node-6", "node-7", "node-8", "node-9", "node-10", "node-11", "node-12", "node-13", "node-14", "node-15"]
nop_aliases = ["node-0", "node-2", "node-4", "node-6", "node-8", "node-10", "node-12", "node-14"]
threshold = 16
[environment_topology.nop_topology.committees.default.chain_configs.4793464827907405086]
nop_aliases = ["node-0", "node-1", "node-2", "node-3", "node-4", "node-5", "node-6", "node-7", "node-8", "node-9", "node-10", "node-11", "node-12", "node-13", "node-14", "node-15"]
nop_aliases = ["node-15"]
threshold = 16
}

if !ec.leaderElector.IsExecutorForChain(msg.DestChainSelector) {
ec.lggr.Infow("skipping message, executor not in pool for destination chain",
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
require.NoError(t, ec.Start(ctx))
time.Sleep(200 * time.Millisecond)
@carte7000 carte7000 force-pushed the simon/devenv/test-executor-node-distribution branch from cad16ee to db7a094 Compare March 20, 2026 12:46
@carte7000 carte7000 requested a review from 0xAustinWang March 20, 2026 12:58
0xAustinWang
0xAustinWang previously approved these changes Mar 20, 2026
@github-actions
Copy link

Code coverage report:

Package main simon/devenv/test-executor-node-distribution diff
github.com/smartcontractkit/chainlink-ccv/aggregator 47.89% 47.89% +0.00%
github.com/smartcontractkit/chainlink-ccv/bootstrap 42.35% 42.35% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 86.39% 86.39% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 50.74% 50.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.51% 46.42% +0.91%
github.com/smartcontractkit/chainlink-ccv/indexer 42.49% 42.49% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 45.27% 45.38% +0.11%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 67.76% 67.76% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 33.10% 33.10% +0.00%

@carte7000 carte7000 enabled auto-merge March 20, 2026 14:09
@carte7000 carte7000 added this pull request to the merge queue Mar 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 20, 2026
@carte7000 carte7000 added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit eb20b52 Mar 20, 2026
27 of 28 checks passed
@carte7000 carte7000 deleted the simon/devenv/test-executor-node-distribution branch March 20, 2026 15:08
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