Skip to content

Conversation

@DiogoSantoss
Copy link
Contributor

Add --nickname flag to DKG.
Peers will send their nickname via sync protocol which will be logged upon connecting for the first time:

17:38:03.733 INFO dkg        Connected to peer 1 of 3                 {"peer": "affectionate-kitchen", "nickname": "Alice"}
17:38:03.742 INFO dkg        Connected to peer 2 of 3                 {"peer": "amiable-mirror", "nickname": "Bob"}

category: feature
ticket: #4059

Copy link

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

This PR adds a --nickname flag to the DKG command to allow operators to set human-friendly peer identifiers. When peers connect via the sync protocol, their nicknames are exchanged and logged, improving the operator experience by making peer connections more recognizable.

Key Changes

  • Added nickname field to the DKG sync protocol (protobuf message)
  • Peers send and display nicknames when connecting during DKG ceremony
  • Flag includes validation for a 32-character maximum length

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cmd/dkg.go Adds --nickname CLI flag with 32-character validation
dkg/dkg.go Passes nickname through to sync protocol initialization
dkg/protocol.go Forwards nickname parameter to startSyncProtocol
dkg/sync/client.go Stores nickname as immutable state and includes it in sync messages
dkg/sync/server.go Extracts nickname from incoming messages and includes it in connection logs
dkg/sync/sync_test.go Updates tests to initialize nicknames for all test nodes
dkg/dkgpb/v1/sync.proto Adds nickname field to MsgSync protobuf message
dkg/dkgpb/v1/sync.pb.go Generated protobuf code for nickname field

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

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.39%. Comparing base (426ba79) to head (f92d3ef).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
cmd/dkg.go 0.00% 5 Missing ⚠️
dkg/dkgpb/v1/sync.pb.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4105      +/-   ##
==========================================
+ Coverage   56.37%   56.39%   +0.02%     
==========================================
  Files         245      245              
  Lines       31169    31183      +14     
==========================================
+ Hits        17571    17586      +15     
- Misses      11284    11291       +7     
+ Partials     2314     2306       -8     

☔ View full report in Codecov by Sentry.
📢 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.

Shutdown bool `protobuf:"varint,3,opt,name=shutdown,proto3" json:"shutdown,omitempty"`
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
Step int64 `protobuf:"varint,5,opt,name=step,proto3" json:"step,omitempty"`
Nickname string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good to note that this will make it incompatible with previous versions.
Either way we allow DKG only with the same MAJOR.MINOR, so it's not something new.

@KaloyanTanev KaloyanTanev added the do not merge Indicate to bulldozer bot that this PR should not be merged label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicate to bulldozer bot that this PR should not be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants