Skip to content

Implement configuration verification#124

Merged
mateeullahmalik merged 4 commits intomasterfrom
refactor-errors
Aug 15, 2025
Merged

Implement configuration verification#124
mateeullahmalik merged 4 commits intomasterfrom
refactor-errors

Conversation

@mateeullahmalik
Copy link
Collaborator

No description provided.

@a-ok123 a-ok123 requested review from a-ok123 and Copilot August 15, 2025 03:07

This comment was marked as outdated.

@a-ok123
Copy link
Contributor

a-ok123 commented Aug 15, 2025

@mateeullahmalik please address co-pilot coments

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 implements configuration verification functionality for supernode startup, ensuring that configuration parameters match the on-chain supernode registration before services are initialized.

  • Adds comprehensive configuration verification system with checks for keyring, identity, ports, and chain registration
  • Integrates configuration verification into the supernode startup process with validation before service initialization
  • Updates test configuration files to use localhost instead of 0.0.0.0 for better local development

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
supernode/services/verifier/interface.go Defines the ConfigVerifierService interface and supporting types for verification results
supernode/services/verifier/verifier.go Implements the configuration verification service with chain validation logic
supernode/services/verifier/verifier_test.go Provides unit tests for the verification service and result structures
supernode/cmd/start.go Integrates config verification into supernode startup process
tests/system/config.test-*.yml Updates test configurations to use localhost instead of 0.0.0.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

result.Warnings = append(result.Warnings, ConfigError{
Field: "host",
Expected: cv.config.SupernodeConfig.Host,
Actual: chainHost,
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

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

The Expected and Actual fields are swapped in the warning. Expected should be the chain value and Actual should be the config value for consistency with other checks.

Suggested change
Actual: chainHost,
Expected: chainHost,
Actual: cv.config.SupernodeConfig.Host,

Copilot uses AI. Check for mistakes.
@mateeullahmalik mateeullahmalik merged commit 9f5b407 into master Aug 15, 2025
7 checks passed
@mateeullahmalik mateeullahmalik deleted the refactor-errors branch August 21, 2025 08:32
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.

4 participants