Skip to content

Comments

support multi nodes#34

Open
Kissadada wants to merge 16 commits intomainfrom
support-multi-nodes
Open

support multi nodes#34
Kissadada wants to merge 16 commits intomainfrom
support-multi-nodes

Conversation

@Kissadada
Copy link
Member

No description provided.

Copy link

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 updates the request verification flow to support verifying against multiple BandChain verify nodes (URLs) instead of a single endpoint, and updates configuration/tests accordingly.

Changes:

  • Replace single verify_url configuration with verify_urls / VERIFY_REQUEST_URLS list-based configuration.
  • Update VerifyRequestMiddleware to verify against multiple URLs concurrently and select an acceptable response.
  • Expand middleware test coverage for multi-URL scenarios and adjust CI/dependency setup.

Reviewed changes

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

Show a summary per file
File Description
app/middleware/verify_request.py Implements multi-URL verification (concurrent requests, result selection, updated error behavior).
app/settings.py Renames/changes verification setting to VERIFY_REQUEST_URLS: list[HttpUrl].
app/main.py Wires new verify_urls setting into the middleware.
tests/test_verify_middleware.py Updates existing tests and adds multi-URL verification test cases.
pyproject.toml Updates packaging version and modifies build-system requirements.
.github/workflows/ci.yaml Updates setup-python action and installs updated packaging tooling before Poetry install.
.env.example Updates example env var to VERIFY_REQUEST_URLS JSON-list format.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… v2 compatibility

- Add test_verify_request_with_multiple_urls_both_success_one_parse_fail to verify
  behavior when both nodes return HTTP 200 but one fails to parse
- Fix VerifyReport model to work with Pydantic v2 by adding defaults to Optional fields
- Update test expectation to match new error message for parse failures
- Add timeout to _verify_url HTTP request
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