Skip to content

Comments

docs: Add warning for key format issue#714

Merged
mergify[bot] merged 1 commit intosigp:unstablefrom
dknopik:doc-for-pubkey-issue
Oct 24, 2025
Merged

docs: Add warning for key format issue#714
mergify[bot] merged 1 commit intosigp:unstablefrom
dknopik:doc-for-pubkey-issue

Conversation

@dknopik
Copy link
Member

@dknopik dknopik commented Oct 24, 2025

Issue Addressed

Proposed Changes

To avoid user confusion and to provide a workaround, give a short explanation in the docs until a fix is released in a stable version.

@dknopik dknopik added the documentation Improvements or additions to documentation label Oct 24, 2025
@claude-code-actions-sigp
Copy link

claude-code-actions-sigp bot commented Oct 24, 2025

Claude finished @dknopik's task —— View job


Code Review Complete

Tasks


Review Summary

This PR adds a helpful warning to the migration documentation about a key format compatibility issue between go-ssv and Anchor. The documentation change is clear and actionable.

Detailed Review

Documentation Quality ✅

The warning is well-placed in the migration guide where users would naturally encounter the issue. The message clearly:

  • Describes the error message users will see
  • Provides the exact fix (change "pubkey" to "pubKey")
  • Sets expectations that this is temporary until a proper fix is released

Technical Accuracy ✅

I verified the underlying code in anchor/common/operator_key/src/encrypted.rs:55 which shows:

#[serde(rename = "pubKey")]
pubkey: Option<String>,

Anchor expects pubKey (camelCase) as per the serde rename directive. The warning accurately reflects this requirement.

Suggestions for Improvement

1. Add file path reference
The warning could be more specific about which file to modify:

-If Anchor fails to start with the message `Unable to parse key: unknown field pubkey, expected one of pubKey (...)`, please change "pubkey" to "pubKey" in the encrypted_private_key.json file.
+If Anchor fails to start with the message `Unable to parse key: unknown field pubkey, expected one of pubKey (...)`, please change `"pubkey"` to `"pubKey"` in your `encrypted_private_key.json` file (typically located at `~/.anchor/<network>/encrypted_private_key.json`).

2. Consider mentioning the root cause
For transparency, you might add a brief note about why this happens:

:::warning
If Anchor fails to start with the message `Unable to parse key: unknown field pubkey, expected one of pubKey (...)`, this indicates the key file uses an older format from go-ssv. Please change `"pubkey"` to `"pubKey"` in your `encrypted_private_key.json` file. This compatibility issue will be fixed in a future release.
:::

3. Minor formatting improvement
The backticks around "pubkey" and "pubKey" help distinguish them as JSON keys rather than general terms. Consider also wrapping the filename similarly.

Overall Assessment

Approve with minor suggestions. This is a valuable addition that will prevent user confusion during migration. The warning:

The suggestions above are optional enhancements - the PR is good to merge as-is if you prefer to keep it minimal.


@dknopik
Copy link
Member Author

dknopik commented Oct 24, 2025

the PR is good to merge as-is if you prefer to keep it minimal.

👍 , wdyt?

@mergify mergify bot added the queued label Oct 24, 2025
mergify bot added a commit that referenced this pull request Oct 24, 2025
@mergify mergify bot merged commit 4b08cde into sigp:unstable Oct 24, 2025
23 checks passed
@mergify mergify bot removed the queued label Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready-for-merge trivial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant