Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move network validation to GetFullNodeAPIV1Curio #345

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Winter-Soren
Copy link

This PR implements network validation at the API connection level to prevent mismatched network connections early in the startup process.

Changes:

  1. Removed separate network validation function and use existing build.BuildTypeString()
  2. Moved network validation from run.go to GetFullNodeAPIV1Curio()
  3. Added validation for each chain node with proper error handling and logging
  4. Only proceeds if at least one compatible node is found

Fixes #340

Copy link
Contributor

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

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

I think cleanup from previous approach is pending.

build/params.go Outdated Show resolved Hide resolved
cmd/curio/run.go Outdated Show resolved Hide resolved
deps/apiinfo.go Show resolved Hide resolved
deps/apiinfo.go Outdated Show resolved Hide resolved
Copy link
Contributor

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

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

Looks good. Just need 1 last change.

cmd/curio/run.go Show resolved Hide resolved
@LexLuthr
Copy link
Contributor

LexLuthr commented Jan 6, 2025

@Winter-Soren Can you please run make gen in the curio repo? It should fix the failing test. It might complaint about missing dependencies, please install those.

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.

Refuse to start if binary network doesn't match chain node network
2 participants