Skip to content

services/committeeverifier: match blockchain chain family#1223

Merged
makramkd merged 11 commits into
mainfrom
mk/fix-devenv-chain-registration
Jul 2, 2026
Merged

services/committeeverifier: match blockchain chain family#1223
makramkd merged 11 commits into
mainfrom
mk/fix-devenv-chain-registration

Conversation

@makramkd

@makramkd makramkd commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Related PR: smartcontractkit/chainlink-ccip#2169

Fixes the root cause of the devenv registration bug where a committee verifier's bootstrap config could end up declaring chains from more than one chain family, and adds a config-level guard so this class of bug can't silently recur.

launchVerifier in build/devenv/services/committeeverifier/base.go was registering every deployed blockchain output as a bootstrap.ChainRegistration entry, regardless of which chain family the verifier itself belongs to.

In a multi-family devenv (e.g. an EVM + Solana topology), a Solana committee verifier's bootstrap config ended up with both SOLANA and EVM chain entries. The fix filters registration to output.Family == in.ChainFamily.

To make sure this can't reappear via a different code path, bootstrap.Config.Chains now rejects entries spanning more than one chain family at load time. A committee verifier binary is built for exactly one family (EVM XOR Solana XOR ..., never mixed) and pushes a single signing key under the assumption every declared chain shares that family; this turns a silent, hard-to-diagnose runtime mismatch into an explicit config validation error naming the offending index and the family already established.

Separately, buildUpdateNodeRequest now also pushes OcrKeyBundle.OnchainSigningPubKey for every declared chain, not just deriving OnchainSigningAddress. A standalone node signs with one shared secp256k1 key across all its declared chains, so exposing the raw key lets downstream lane-configuration code (currently in chainlink-ccip) derive a signer address for a chain family the node never declared directly, e.g. bridging a Solana node's key into a Canton-family lane, instead of only being able to translate between families the node explicitly registered. This pairs with the chainlink-ccip fix for cross-family signer lookup.

Testing

  • Ran go build ./... and go test ./... in the bootstrap module
  • Added unit tests for the new single-family validation:
    mixed-family Chains list rejected, same family in different
    casing accepted, and an invalid entry not masking the family check
    on the remaining valid entries.
  • Added unit tests confirming OnchainSigningPubKey is populated
    and identical across every ChainConfig produced for a NOP's
    declared chains (same underlying key).

Checklist

  • Breaking changes documented in changelog (see changelog directory)
  • Cross link related PRs (in this or other repositories)
  • just lint fix - no new lint errors
  • just generate - mocks and protobufs are up to date

When adding bootstrap.ChainRegistration to the bootstrapInput, only add
chains that match the chain family of the committee verifier.
@makramkd makramkd marked this pull request as ready for review July 2, 2026 07:03
@makramkd makramkd requested a review from a team as a code owner July 2, 2026 07:03
- Push OnchainSigningPubKey for every declared chain, not just
  the chain's own, so JD lane resolution can derive a signer
  address for a family the NOP never declared (e.g. a
  solana-only NOP signing into a canton-destination lane).
- Reject Chains configs that mix chain families: a bootstrapper
  is built for exactly one family and shares one signing key
  across every declared chain, so a mixed list would silently
  push a mis-formatted key for whichever family loses out.
tt-cll
tt-cll previously approved these changes Jul 2, 2026
carte7000
carte7000 previously approved these changes Jul 2, 2026
@makramkd makramkd enabled auto-merge July 2, 2026 17:57
@makramkd makramkd dismissed stale reviews from carte7000 and tt-cll via c253be4 July 2, 2026 18:41
tt-cll
tt-cll previously approved these changes Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Code coverage report:

Package main mk/fix-devenv-chain-registration Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 49.53% 49.57% +0.04%
github.com/smartcontractkit/chainlink-ccv/bootstrap 53.68% 55.47% +1.79%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 13.55% 13.55% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 52.79% 52.79% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 46.47% 46.47% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.54% 35.54% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 46.25% 46.25% +0.00%
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 63.06% 63.06% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 35.17% 35.17% +0.00%
Total 46.80% 46.80% +0.00%

@makramkd makramkd added this pull request to the merge queue Jul 2, 2026
Merged via the queue into main with commit fd1c288 Jul 2, 2026
36 checks passed
@makramkd makramkd deleted the mk/fix-devenv-chain-registration branch July 2, 2026 20:39
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