Skip to content

CRE-4087: Fix to DKG config generation#22319

Merged
cedric-cordenier merged 1 commit intodevelopfrom
CRE-4087-dkg-fix
May 7, 2026
Merged

CRE-4087: Fix to DKG config generation#22319
cedric-cordenier merged 1 commit intodevelopfrom
CRE-4087-dkg-fix

Conversation

@cedric-cordenier
Copy link
Copy Markdown
Contributor

Requires

Supports

Copilot AI review requested due to automatic review settings May 6, 2026 12:54
@cedric-cordenier cedric-cordenier requested review from a team as code owners May 6, 2026 12:54
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

👋 cedric-cordenier, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

✅ No conflicts with other open PRs targeting develop

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

Risk Rating: HIGH — This PR changes how DKG reporting plugin config bytes are derived and propagated into OCR3.1 contract configuration, which can directly affect on-chain/off-chain compatibility during deployments.

This PR aims to fix DKG config generation by removing the separate dkgocrtypes.ReportingPluginConfig plumbing and instead marshaling the DKG plugin config from V3_1OracleConfig.DKGOffchainConfig.

Changes:

  • Removed passing dkgocrtypes.ReportingPluginConfig through DKG config generation and contract configuration operations; DKG config now marshals from cfg.DKGOffchainConfig.
  • Simplified DKGOffchainConfig to be a YAML/JSON-friendly struct (string public keys) and adjusted call sites accordingly.
  • Updated tests and deployment changesets to use the new DKGOffchainConfig flow.

Scrupulous human review recommended:

  • deployment/cre/ocr3/ocr3_1/oracle_config.go: DKGOffchainConfig.Marshal() semantics around PreviousInstanceID and correctness of produced ReportingPluginConfig bytes.
  • deployment/cre/ocr3/ocr3_1/config_dkg.go: exported GenerateDKGConfigFromNodes safety/validation when DKGOffchainConfig is absent (panic risk).

Reviewed changes

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

Show a summary per file
File Description
deployment/cre/ocr3/ocr3_1/registry.go Stops threading a separate DKG plugin config; uses oracleOffchainConfig.DKGOffchainConfig and adds a required-non-nil check.
deployment/cre/ocr3/ocr3_1/oracle_config.go Refactors DKGOffchainConfig to remove embedded ReportingPluginConfig and rely on marshal-time conversion.
deployment/cre/ocr3/ocr3_1/config_test.go Updates DKG config generation test to match new GenerateDKGConfigFromNodes signature and config shape.
deployment/cre/ocr3/ocr3_1/config_dkg.go Updates DKG config generation API to marshal from cfg.DKGOffchainConfig instead of an explicit dkgCfg argument.
deployment/cre/ocr3/ocr3_1/changeset/operations/contracts/configure_vault_dkg.go Populates OracleConfig.DKGOffchainConfig from DON inputs and removes explicit plugin-config creation/validation.
deployment/cre/ocr3/ocr3_1/changeset/operations/contracts/configure_dkg.go Removes ReportingPluginConfig from operation inputs and relies on OracleConfig.DKGOffchainConfig.

Comment thread deployment/cre/ocr3/ocr3_1/oracle_config.go
Comment thread deployment/cre/ocr3/ocr3_1/oracle_config.go Outdated
Comment on lines +50 to 55
func GenerateDKGConfigFromNodes(cfg V3_1OracleConfig, nodes []deployment.Node, registryChainSel uint64, secrets ocr.OCRSecrets, extraSignerFamilies []string) (ocr3.OCR2OracleConfig, error) {
nca := ocr3.MakeNodeKeysSlice(nodes, registryChainSel, extraSignerFamilies)
cfgBytes, err := dkgCfg.MarshalBinary()
cfgBytes, err := cfg.DKGOffchainConfig.Marshal()
if err != nil {
return ocr3.OCR2OracleConfig{}, fmt.Errorf("failed to marshal ReportingPluginConfig: %w", err)
}
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 6, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestIntegration_Functions_MultipleV1Requests_Success The test failed without a specific error message, indicating an unspecified failure in the integration test. Logs ↗︎

View Full Report ↗︎Docs

@cedric-cordenier cedric-cordenier force-pushed the CRE-4087-dkg-fix branch 2 times, most recently from 998dd5f to 00a8587 Compare May 6, 2026 14:57
@cl-sonarqube-production
Copy link
Copy Markdown

@cedric-cordenier cedric-cordenier enabled auto-merge May 6, 2026 20:17
@cedric-cordenier cedric-cordenier added this pull request to the merge queue May 6, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 6, 2026
@cedric-cordenier cedric-cordenier added this pull request to the merge queue May 7, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 7, 2026
@cedric-cordenier cedric-cordenier added this pull request to the merge queue May 7, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 7, 2026
@cedric-cordenier cedric-cordenier added this pull request to the merge queue May 7, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 7, 2026
@cedric-cordenier cedric-cordenier added this pull request to the merge queue May 7, 2026
Merged via the queue into develop with commit 670c2f1 May 7, 2026
237 of 240 checks passed
@cedric-cordenier cedric-cordenier deleted the CRE-4087-dkg-fix branch May 7, 2026 11:07
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.

4 participants