Skip to content

[CRE] vault DKG: allow committee-shrinking reshares - #23624

Open
prashantkumar1982 wants to merge 1 commit into
developfrom
cre/vault-dkg-reshare-allow-shrink
Open

[CRE] vault DKG: allow committee-shrinking reshares#23624
prashantkumar1982 wants to merge 1 commit into
developfrom
cre/vault-dkg-reshare-allow-shrink

Conversation

@prashantkumar1982

@prashantkumar1982 prashantkumar1982 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Motivation

ConfigureVaultDKG.VerifyPreconditions required len(NodeIDs) == len(RecipientPublicKeys). That makes it impossible to express a reshare that removes a node.

A DKG reshare must be run by the outgoing committee — only they hold shares to re-deal — so the OCR instance size N (= len(NodeIDs)) must equal the dealer set (= the previous instance's recipients). The new recipient set can legitimately be smaller. The fixed smdkg enforces len(dealers) == N, so with the old precondition a shrink hits:

ManagedOCR3_1Oracle: error during NewReportingPlugin(): invalid config:
number of dealer public keys (8) does not match the number of oracles N (7)

ConfigureVaultDKG.VerifyPreconditions tied len(NodeIDs) to len(RecipientPublicKeys),
which blocks a reshare that removes a node: smdkg requires the reshare to be run by the
outgoing committee (N == number of dealers == prior recipients), while the new recipient
set is smaller.

Split the length check by run type:
- Fresh DKG (no previousInstanceID): nodeIDs == dealers == recipients (all equal, dealers==recipients).
- Reshare: len(nodeIDs) == len(dealerPublicKeys); recipients may differ.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Sep 2, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

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