Add version diff endpoint implementation#1041
Open
Robinsonchiziterem wants to merge 3 commits into
Open
Conversation
Contributor
|
@Robinsonchiziterem is attempting to deploy a commit to the aliphatichyd's projects Team on Vercel. A member of the Team first needs to authorize it. |
ALIPHATICHYD
self-requested a review
June 2, 2026 11:36
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ALIPHATICHYD
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
This pull request verifies the robust implementation of Unified Contract Search Filters (supporting mixed combinations of network, category, and verification-only filters alongside full-text search) inside the
/api/contractsendpoint, ensuring that combining filters does not break pagination or search logic.The endpoint
/api/contractsmaps tohandlers::list_contractsinsidebackend/api/src/handlers.rs, which naturally implements all requested filters:networks,categories,verified_only, andqueryusing top-levelANDclauses in SQL queries.SearchFilterMetadataand populates the"filters"property insidePaginatedResponseusing.with_filters(filters).This pull request completes and verifies the implementation of the Version History Compare & Changelog Diff functionality (Issue Add changelog and version history diff endpoints #955) inside the Soroban Registry. It enables consumers to track semantic version history, explicitly analyze version-to-version metadata differences (such as WASM hashes, source URLs, commit hashes, release notes, and change notes), and ensures reliable backend builds with updated lockfile constraints.
🚀 Changes Made
backend/api/tests/search_filter_tests.rsbackend/api/src/routes.rsGET /api/contracts/:id/versions/comparemapping to the compare handler.backend/api/src/handlers.rscompare_contract_versionsto parse version parameters, query database version records, perform semantic field comparisons, and return a structured difference.backend/Cargo.lockredox_syscall, telemetry, etc.) to ensure build stability and resolve local/remote mismatch conflicts.🧪 Integration Test Coverage
🔍 Endpoint Details
We have introduced
search_filter_tests.rsto cover:GET /api/contracts?networks=testnet&categories=DeFi&verified_only=true&query=tokenand asserts that the response schema, pagination boundaries, and"filters"active-filters metadata matches the query.200 OKempty list with total count0is returned instead of errors.GET /api/contracts/:id/versions/compare?from={version_a}&to={version_b}Allows clients to retrieve a comprehensive diff between two version tags of a specific contract.
Sample Request:
curl "https://registry.soroban.org/api/contracts/550e8400-e29b-41d4-a716-446655440000/versions/compare?from=1.0.0&to=1.1.0"Sample Response Schema:
{ "contract_id": "550e8400-e29b-41d4-a716-446655440000", "from_version": { "version": "1.0.0", "wasm_hash": "a1b2c3d4...", "source_url": "https://github.com/example/contract", "commit_hash": "f623ad...", "release_notes": "Initial release", "change_notes": null }, "to_version": { "version": "1.1.0", "wasm_hash": "e5f6g7h8...", "source_url": "https://github.com/example/contract", "commit_hash": "c71a30...", "release_notes": "Added performance improvements", "change_notes": "Optimized execution cost" }, "differences": [ { "field": "wasm_hash", "from_value": "a1b2c3d4...", "to_value": "e5f6g7h8..." }, { "field": "commit_hash", "from_value": "f623ad...", "to_value": "c71a30..." }, { "field": "release_notes", "from_value": "Initial release", "to_value": "Added performance improvements" }, { "field": "change_notes", "from_value": null, "to_value": "Optimized execution cost" } ], "wasm_changed": true }✅ Checklist
GET /api/contracts/:id/versions/compareregistered and verified.mainbranch.backend/Cargo.lock) cleanly with the latest telemetry and observability updates.feature/version-pagination-diff.Closes #955