Skip to content

dkg: re-sign the proposer config on lock changes - #4836

Open
KaloyanTanev wants to merge 2 commits into
kalo/proposer-config-createfrom
kalo/proposer-config-lock-edits
Open

KaloyanTanev wants to merge 2 commits into
kalo/proposer-config-createfrom
kalo/proposer-config-lock-edits

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

Carries the proposer config into the new lock of the lock-changing edits: recreate-private-keys, add-operators, remove-operators and replace-operator take --proposer-config-file and --overrides-file, agree on the current content before resharing, sign the revision 1 document under the new lock in the node signatures step and write it to <output-dir>/vc-config/proposer-config.json, which replaces the current file.

Joining operators have no file and operators being removed sign nothing, so they adopt the content the remaining operators agree on (adopt in MsgProposerConfigContent); a removed operator's revision 0 drift does not block its removal and it gets no file.

category: feature
ticket: #4324

@KaloyanTanev KaloyanTanev self-assigned this Nov 11, 2026
@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Nov 11, 2026
@KaloyanTanev
KaloyanTanev added this pull request to stack #4832 November 11, 2026 10:22
@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.41667% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.37%. Comparing base (1698608) to head (f906149).

Files with missing lines Patch % Lines
dkg/protocolsteps.go 77.27% 5 Missing ⚠️
dkg/proposerconfig.go 91.48% 4 Missing ⚠️
dkg/dkgpb/v1/proposerconfig.pb.go 0.00% 3 Missing ⚠️
cluster/proposerconfig/file.go 0.00% 1 Missing ⚠️
cmd/edit_addoperators.go 66.66% 1 Missing ⚠️
cmd/edit_recreateprivatekeys.go 66.66% 1 Missing ⚠️
cmd/edit_removeoperators.go 66.66% 1 Missing ⚠️
cmd/edit_replaceoperator.go 66.66% 1 Missing ⚠️
dkg/protocol_addoperators.go 87.50% 1 Missing ⚠️
dkg/protocol_removeoperators.go 93.75% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@                       Coverage Diff                       @@
##           kalo/proposer-config-create    #4836      +/-   ##
===============================================================
+ Coverage                        68.26%   68.37%   +0.10%     
===============================================================
  Files                              264      264              
  Lines                            34597    34793     +196     
===============================================================
+ Hits                             23618    23790     +172     
- Misses                           10978    11002      +24     
  Partials                             1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KaloyanTanev
KaloyanTanev force-pushed the kalo/proposer-config-lock-edits branch from b09d8c3 to f906149 Compare November 11, 2026 13:16
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the changes preserving proposer configuration across lock-changing ceremonies.

No open issues 🎉

1 file not reviewed
  • dkg/dkgpb/v1/proposerconfig.pb.go: Generated file
What changed in this PR

Preserves proposer configuration across Charon’s lock-changing ceremonies, supporting consistent validator and builder settings as clusters evolve.

Changes:

  • Adds proposer-config and overrides inputs to all four lock-changing edit commands.
  • Agrees on configuration before resharing, re-signs it under the new lock at revision 1, and writes it for the new operator set.
  • Adds coverage for adoption, configuration mismatches, validation, signatures, and output handling.
File Description
dkg/​protocolsteps.go Adds agreement, signing, and proposer-config output steps.
dkg/​protocolsteps_internal_test.go Tests config signatures and artifact writing.
dkg/​protocol.go Stores proposer-config state in the protocol context.
dkg/​protocol_test.go Tests config preservation across edit ceremonies.
dkg/​protocol_reshare.go Wires config agreement into resharing.
dkg/​protocol_replaceoperator.go Wires config carryover into operator replacement.
dkg/​protocol_removeoperators.go Handles agreement and adoption during removal.
dkg/​protocol_addoperators.go Wires config carryover into operator addition.
dkg/​proposerconfig.go Implements adoption and validates carried configuration.
dkg/​proposerconfig_internal_test.go Tests adoption, validation, and mixed config states.
dkg/​dkgpb/​v1/​proposerconfig.proto Adds the configuration adoption flag.
dkg/​dkgpb/​v1/​proposerconfig.pb.go Updates generated protobuf bindings.
dkg/​dkg.go Adapts agreement calls and uses the shared output path.
cmd/​edit.go Logs config replacement only when output exists.
cmd/​edit_replaceoperator.go Adds config flags and output guidance.
cmd/​edit_removeoperators.go Adds config flags and output guidance.
cmd/​edit_recreateprivatekeys.go Adds config flags and output guidance.
cmd/​edit_internal_test.go Tests conditional output guidance.
cmd/​edit_addoperators.go Adds config flags and output guidance.
cmd/​createcluster.go Uses the shared proposer-config path helper.
cluster/​proposerconfig/​file.go Adds the standard proposer-config path helper.
app/​proposerconfigservice.go Exposes reusable runtime compatibility validation.
app/​proposerconfigservice_internal_test.go Tests gas-limit and builder-setting validation.

Review effort: Balanced

@KaloyanTanev
KaloyanTanev marked this pull request as ready for review November 11, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-invalid PR raised against invalid branch. Not a main or release branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants