ava-labs / ava-labs/platform-cli

keys generate prints unexpected P-Chain address format

Open Beginner friendly
#35 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## Summary

`platform-cli keys generate` appears to print a P-Chain address in a different/incorrect format from `platform-cli wallet address`.

The EVM address matches between both commands, but the P-Chain address shown immediately after key generation does not match the wallet command output.

## Reproduction

```bash
go run . keys generate --encrypt=false

Output:

Key generated successfully!
Name: default
P-Chain: Lgocgo1se753cNrhUke5c8yCuMNkVUXZo
EVM: 0x9C252013241CE4E781010Ff11524b6cD3a52dAf3
Encrypted: false
Default: yes

Then:

go run . wallet address

Output:

P-Chain Address: P-fuji16lccvh37nkrhqh7j7eda95kv9s7mnwld7zf6sf
EVM Address: 0x9C252013241CE4E781010Ff11524b6cD3a52dAf3

## Expected Behavior

keys generate should print the same P-Chain address format as wallet address, likely including the chain/network prefix, for example:

P-Chain: P-fuji16lccvh37nkrhqh7j7eda95kv9s7mnwld7zf6sf

## Actual Behavior

keys generate prints:

P-Chain: Lgocgo1se753cNrhUke5c8yCuMNkVUXZo

while wallet address prints:

P-Chain Address: P-fuji16lccvh37nkrhqh7j7eda95kv9s7mnwld7zf6sf

## Notes

The underlying key appears to be fine because the EVM address matches and wallet address derives the expected P-Chain address. This looks like a display/
formatting issue in the keys generate success output.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `keys generate` and `wallet address` command entry points and compare how each formats the P-Chain address. Reproduce with `go run . keys generate --encrypt=false` and `go run . wallet address`; done means key generation prints the same prefixed P-Chain address as the wallet command while preserving the matching EVM address.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.