Skip to content

(feat): Enable per-owner overrides for the max ciphertext size#2121

Merged
justinkaseman merged 4 commits into
mainfrom
CRE-4346
Jun 4, 2026
Merged

(feat): Enable per-owner overrides for the max ciphertext size#2121
justinkaseman merged 4 commits into
mainfrom
CRE-4346

Conversation

@justinkaseman
Copy link
Copy Markdown
Contributor

Before:

  • global.VaultCiphertextSizeLimit

After:

  • owner.<addr>.PerOwner.VaultCiphertextSizeLimit = per-owner override
  • global.PerOwner.VaultCiphertextSizeLimit = global override (applies to all owners)

Backwards compatibility:

  1. All nodes use the hardcoded 2KB default.
  2. If any nodes have the old key path via CL_CRE_SETTINGS, it stops being found so falls back to 2KB default

For OCR safety: only CL_CRE_SETTINGS needs to be checked for the old key, and configuring the new override should only be done after all nodes of the DON have upgraded.

Copilot AI review requested due to automatic review settings June 3, 2026 17:28
@justinkaseman justinkaseman requested a review from a team as a code owner June 3, 2026 17:28
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

👋 justinkaseman, 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

github-actions Bot commented Jun 3, 2026

✅ API Diff Results - github.com/smartcontractkit/chainlink-common

✅ Compatible Changes (1)

pkg/settings/cresettings.Owners (1)
  • VaultCiphertextSizeLimit — ➕ Added

📄 View full apidiff report

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

Enables configuring VaultCiphertextSizeLimit as an owner-scoped setting (with global.PerOwner.* acting as a global override for all owners), by moving the setting definition and its defaults from the global schema into the PerOwner scope.

Changes:

  • Move VaultCiphertextSizeLimit from global schema settings into the PerOwner settings group.
  • Update generated defaults (defaults.json, defaults.toml) to reflect the new key path.
  • Update the CRE settings flowchart in README.md to reflect the new location of the setting.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
pkg/settings/cresettings/settings.go Moves VaultCiphertextSizeLimit into PerOwner scope and updates the default schema accordingly.
pkg/settings/cresettings/README.md Updates the mermaid flowchart to reference PerOwner.VaultCiphertextSizeLimit instead of the global key.
pkg/settings/cresettings/defaults.toml Removes the global VaultCiphertextSizeLimit entry and adds it under [PerOwner].
pkg/settings/cresettings/defaults.json Removes the global VaultCiphertextSizeLimit entry and adds it under PerOwner.

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

Comment thread pkg/settings/cresettings/settings.go Outdated

// DANGER(cedric): Be extremely careful changing this vault limit as it acts as a default value
// used by the Vault OCR plugin -- changing this value could cause issues with the plugin during an image
// DANGER(cedric): Be extremely careful changing these vault limits as they act as a default value
Comment thread pkg/settings/cresettings/settings.go
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment on lines +81 to 84

// Deprecated: Use global.PerOwner.VaultCiphertextSizeLimit (global) or owner.<addr>.PerOwner.VaultCiphertextSizeLimit (per owner) instead.
VaultCiphertextSizeLimit: Size(2 * config.KByte),
VaultIdentifierKeySizeLimit: Size(64 * config.Byte),
Comment on lines +281 to 283
// Deprecated: Use global.PerOwner.VaultCiphertextSizeLimit (global) or owner.<addr>.PerOwner.VaultCiphertextSizeLimit (per owner) instead.
VaultCiphertextSizeLimit Setting[config.Size]
VaultShareSizeLimit Setting[config.Size]
Comment thread pkg/settings/cresettings/README.md
@justinkaseman justinkaseman added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 1b78cfe Jun 4, 2026
33 checks passed
@justinkaseman justinkaseman deleted the CRE-4346 branch June 4, 2026 18:28
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