(feat): Enable per-owner overrides for the max ciphertext size#2121
Conversation
|
👋 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! |
✅ API Diff Results -
|
There was a problem hiding this comment.
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
VaultCiphertextSizeLimitfrom global schema settings into thePerOwnersettings group. - Update generated defaults (
defaults.json,defaults.toml) to reflect the new key path. - Update the CRE settings flowchart in
README.mdto 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.
|
|
||
| // 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 |
|
|
||
| // Deprecated: Use global.PerOwner.VaultCiphertextSizeLimit (global) or owner.<addr>.PerOwner.VaultCiphertextSizeLimit (per owner) instead. | ||
| VaultCiphertextSizeLimit: Size(2 * config.KByte), | ||
| VaultIdentifierKeySizeLimit: Size(64 * config.Byte), |
| // Deprecated: Use global.PerOwner.VaultCiphertextSizeLimit (global) or owner.<addr>.PerOwner.VaultCiphertextSizeLimit (per owner) instead. | ||
| VaultCiphertextSizeLimit Setting[config.Size] | ||
| VaultShareSizeLimit Setting[config.Size] |
Before:
global.VaultCiphertextSizeLimitAfter:
owner.<addr>.PerOwner.VaultCiphertextSizeLimit= per-owner overrideglobal.PerOwner.VaultCiphertextSizeLimit= global override (applies to all owners)Backwards compatibility:
CL_CRE_SETTINGS, it stops being found so falls back to 2KB defaultFor 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.