Skip to content

Conversation

@makramkd
Copy link
Collaborator

@makramkd makramkd commented Jan 28, 2026

This PR adds some changes to get the committee verifier working when reading from Canton. The general approach here is that the env.toml adds some information that is then used to build the entire configuration, after the Canton chains are started.

This is currently necessary because there's no way for us to know ahead of time what the Canton Party ID (akin to a public key) will be that we can use in the Canton source reader.

  • Add CantonConfigs and DisableFinalityCheckers to VerifierInput. These are pulled into the committee verifier config if they're non-nil/non-empty.
  • Update env-canton-evm.toml w/ the CantonConfigs and DisableFinalityCheckers appropriately. The CantonConfig needs to be further hydrated by the full party ID, this is done in hydrateCantonConfig.
  • Extracted common Canton functionality for devenv specifically to a Helper, this is probably temporary until we get real contract deployments going.

@makramkd makramkd marked this pull request as ready for review January 28, 2026 19:02
@makramkd makramkd requested review from a team and skudasov as code owners January 28, 2026 19:02
Copy link
Contributor

@0xAustinWang 0xAustinWang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a scenario where the hydrated input would change post startup?

Authority: authority,
},
}
found = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of using var found we can just return early if found, everything from line 233 will be an error scenario

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory there might be multiple Canton chains in the outputs slice - if there was only one, then I believe the return would be fine.

// Get the full party ID (name + hex id) from the canton participant.
// TODO: how to support multiple participants?
grpcURL := output.NetworkSpecificData.CantonEndpoints.Participants[0].GRPCLedgerAPIURL
jwt := output.NetworkSpecificData.CantonEndpoints.Participants[0].JWT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it feels like a lot of the jwt / grpc implementation can be put into the startup of a canton accessor or canton source reader, separate from devenv.

It feels useful to have something like this in prod to protect against misconfigs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Canton source reader needs the URL and the JWT to connect to the Canton node - those need to be provided by config, since there's no other way to discover it at the moment.

}

authority := grpcURL
if idx := strings.LastIndex(authority, ":"); idx != -1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how canton works, what is the authority used for and how is it different from the rpc url directly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This authority thing is to tell Nginx (which is proxying the Canton gRPC API) which server we're trying to access. The flow is source reader -> nginx -> canton gRPC.

@makramkd
Copy link
Collaborator Author

Is there a scenario where the hydrated input would change post startup?

Good question, this should not happen, unless the whole env is destroyed and recreated, in which case its another ccv up

@github-actions
Copy link

Code coverage report:

Package main mk/step3/NONEVM-3511 diff
github.com/smartcontractkit/chainlink-ccv/aggregator 48.39% 48.39% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/committee 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 42.29% 42.35% +0.06%
github.com/smartcontractkit/chainlink-ccv/indexer 37.16% 37.16% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 34.97% 36.76% +1.79%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 15.70% 15.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 61.22% 61.22% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 55.57% 55.56% -0.01%


// DisableFinalityCheckers is a list of chain selectors for which the finality violation checker should be disabled.
// The chain selectors are formatted as strings of the chain selector.
DisableFinalityCheckers []string `toml:"disable_finality_checkers"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that already defined in GeneratedConfig.DisableFinalityCheckers?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good note, maybe this needs to be part of the GeneratedConfig somehow

}

// hydrateCantonConfig hydrates the canton config with the full party ID for the CCIPOwnerParty.
func hydrateCantonConfig(in *VerifierInput, outputs []*blockchain.Output) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought, but I wonder if it's not the right time to split services/commiteVerifier.go into something like this

- commiteeVerifier (directory instead of single file )
|---- evm.go
|---- canton.go

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I 100% agree with this, I think we should make packages for each service within services. I can do it in a follow up.

@makramkd makramkd added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit cb0029c Jan 29, 2026
18 checks passed
@makramkd makramkd deleted the mk/step3/NONEVM-3511 branch January 29, 2026 09:32
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