Change CL node executor job distribution#943
Merged
Conversation
0xAustinWang
previously approved these changes
Mar 18, 2026
Contributor
There was a problem hiding this comment.
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.IsExecutorForChainand 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) |
cad16ee to
db7a094
Compare
0xAustinWang
previously approved these changes
Mar 20, 2026
|
Code coverage report:
|
0xAustinWang
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.