Skip to content

Comments

chore: use ssz instead of json in annotate validators#71

Merged
g11tech merged 1 commit intomainfrom
grapebaba/change_annotate
Dec 13, 2025
Merged

chore: use ssz instead of json in annotate validators#71
g11tech merged 1 commit intomainfrom
grapebaba/change_annotate

Conversation

@GrapeBaBa
Copy link
Member

No description provided.

Signed-off-by: Chen Kai <281165273grape@gmail.com>
Copy link
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

This PR attempts to change the validator private key file format from JSON to SSZ by updating the filename extension in the node assignment output. The change modifies a single line where PRIVKEY_FILENAME is constructed to use .ssz instead of .json.

Key Changes:

  • Updated validator private key filename extension from .json to .ssz in the node assignment generation logic

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

@@ -568,7 +568,7 @@ for idx in "${!ASSIGNMENT_NODE_NAMES[@]}"; do
fi

PUBKEY_HEX_NO_PREFIX="${PUBKEY_HEX_VALUE#0x}"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The filename extension has been changed to .ssz, but there are multiple references throughout the codebase that still expect .json files. Specifically:

  • Line 189 checks for validator_${i}_sk.json existence
  • Line 261 reports creating validator_${i}_sk.json files
  • Line 671 lists validator_${i}_sk.json in output
  • ansible/roles/qlean/tasks/main.yml line 114 references sk.json
  • client-cmds/qlean-cmd.sh line 24 references sk.json
  • parse-vc.sh line 75 references sk.json

Additionally, the key generation command at line 251 uses --export-format both, but it's unclear whether this generates both .json and .ssz files or only one format. This mismatch will cause runtime failures when the code expects files with the .ssz extension but only .json files exist, or vice versa.

Suggested change
PUBKEY_HEX_NO_PREFIX="${PUBKEY_HEX_VALUE#0x}"
PUBKEY_HEX_NO_PREFIX="${PUBKEY_HEX_VALUE#0x}"
# Note: The validator secret key file extension has changed from .json to .ssz for consistency.

Copilot uses AI. Check for mistakes.
@g11tech g11tech merged commit a88c243 into main Dec 13, 2025
6 checks passed
@g11tech g11tech deleted the grapebaba/change_annotate branch December 13, 2025 09:22
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.

2 participants