Skip to content

Conversation

@riemannulus
Copy link
Contributor

  • Introduced parsePubkey function to handle both hex and base64 formats for public keys, enhancing flexibility in input handling.
  • Implemented isHexString utility to validate hex strings.
  • Added extensive unit tests in genesis_test.go to ensure robust error handling and correctness for various pubkey formats and edge cases.
  • Updated GetGenesisValidatorCmd to utilize the new pubkey parsing logic, improving command usability.

These changes enhance the command-line interface for managing validators by allowing more versatile pubkey input formats.

- Introduced `parsePubkey` function to handle both hex and base64 formats for public keys, enhancing flexibility in input handling.
- Implemented `isHexString` utility to validate hex strings.
- Added extensive unit tests in `genesis_test.go` to ensure robust error handling and correctness for various pubkey formats and edge cases.
- Updated `GetGenesisValidatorCmd` to utilize the new pubkey parsing logic, improving command usability.

These changes enhance the command-line interface for managing validators by allowing more versatile pubkey input formats.
@riemannulus riemannulus self-assigned this Aug 7, 2025
Copilot AI review requested due to automatic review settings August 7, 2025 20:38

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 72.22222% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
x/evmvalidator/client/cli/genesis.go 72.22% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

…ling

- Updated `parsePubkey` function to provide clearer error messages for invalid public key formats, ensuring robust validation for both hex and base64 inputs.
- Added comprehensive unit tests in `genesis_test.go` to cover various edge cases and expected error scenarios, improving test coverage and reliability.
- This enhancement strengthens the overall input handling for public keys, ensuring better user feedback and error management.
@riemannulus riemannulus requested a review from Copilot August 7, 2025 20:50
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 introduces enhanced pubkey parsing functionality to the evmvalidator module, allowing both hex and base64 input formats for public keys. The implementation adds flexibility to the command-line interface while maintaining validation for compressed secp256k1 public keys.

Key changes:

  • Added parsePubkey function that handles both hex (with optional 0x prefix) and base64 formats
  • Implemented isHexString utility for hex validation
  • Enhanced GetGenesisValidatorCmd to use the new parsing logic with improved documentation

Reviewed Changes

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

File Description
x/evmvalidator/client/cli/genesis.go Implements new pubkey parsing logic and updates command documentation
x/evmvalidator/client/cli/genesis_test.go Comprehensive test suite covering various input formats, edge cases, and error scenarios

@riemannulus riemannulus merged commit 25bb3db into main Aug 12, 2025
10 checks passed
@riemannulus riemannulus deleted the fix/support-tendermint-pub-key branch August 12, 2025 16:00
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