-
Notifications
You must be signed in to change notification settings - Fork 336
feat: Enhanced endpoint validation with backup testing and automatic failover #2647
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
Open
JohnnyWyles
wants to merge
7
commits into
main
Choose a base branch
from
jw/chainregistrysync
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Test RPC and REST endpoints independently (can use different indices) - Try endpoints sequentially until finding working ones - Save backup endpoint info to state (rpcEndpointIndex, restEndpointIndex) - Output "RPC/REST Backup Used" messages when fallbacks are used - Add helper functions: getEndpointCount(), updated getCounterpartyChainAddress() - Add fullValidation() function for complete chain validation - Validates all chains in batches of 10 - No date checking (validates everything) - Useful for manual full revalidation Results: - 101/172 chains passing (58.7% success rate) - 110 chains using backup endpoints successfully - 27 additional original chains now passing (17→44 of original 80) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Load validation state during chainlist generation - Check for backupUsed data in validation results - Automatically promote validated working endpoints to position [0] - Support independent RPC/REST endpoint reordering - Maintain zone_chains priority for chains without backup data - Add console logging when using validated endpoints This ensures the frontend always tries the validated working endpoint first, reducing latency and improving reliability. Example: Bandchain RPC endpoint [8] promoted to [0] after validation found it was the first working endpoint. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- New on-demand workflow for validating all chain endpoints - Validates all 172 chains in batches - Optional chainlist regeneration parameter - Creates separate PR branch (update/full_validation) - Useful for monthly deep validation or after major changes Usage: Actions → Full Endpoint Validation → Run workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- All chain registry endpoints now included as fallbacks - Validated working endpoints promoted to position [0] - Independent RPC/REST endpoint ordering - 172 chains in osmosis-1 chainlist (up from 80) - Each chain now has multiple fallback endpoints Key improvements: - Osmosis: RPC[1] and REST[3] promoted to [0] (validated working) - Bandchain: RPC[8] and REST[8] promoted to [0] (first working found) - 110 chains have validated endpoints at position [0] Frontend will now try validated working endpoints first, with automatic fallback to additional chain registry endpoints. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Full validation results for all 172 chains: - 101 chains passing (58.7% success rate) - 71 chains failing (41.3%) - 110 chains using backup endpoints Backup endpoint tracking added to state: - rpcEndpointIndex: Which RPC endpoint passed validation - restEndpointIndex: Which REST endpoint passed validation - rpcAddress: The working RPC endpoint - restAddress: The working REST endpoint Original 80 chains improvement: - Before: 17/80 passing (21.25%) - After: 44/80 passing (55.0%) - +27 chains rescued by backup endpoint testing (+158% improvement) Notable rescues: - Comdex: Found working endpoints at position [8] - Impacthub: RPC[6], REST[8] required - Kichain: RPC[7], REST[8] after multiple failures Independent RPC/REST validation working as designed: - Osmosis: RPC[1], REST[3] - Irisnet: RPC[0], REST[4] - Desmos: RPC[1], REST[0] 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…dpoints - Resolved conflicts in generated files - Kept PR's BAND endpoints (band-rpc.ibs.team, band-api.ibs.team) - Regenerated chainlist and state with latest chain registry data - Incorporated automated updates from main branch
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 PR enhances the endpoint validation and chainlist generation system to automatically discover and use working backup endpoints from the Chain Registry, significantly improving reliability.
Key Improvements
1. Enhanced Validation Logic
2. Smart Chainlist Generation
zone_chains.jsonas primary source, with ALL Chain Registry endpoints as fallbacks3. Full Validation Workflow
.github/workflows/full_validation.ymlfor validating all chainsResults
Original chains (80 total):
All chains (172 total):
Technical Changes
Files Modified
.github/workflows/utility/validateEndpoints.mjsfullValidation()function for validating all chains.github/workflows/utility/generate_chainlist_new.mjs.github/workflows/full_validation.yml(NEW)Generated Files
osmosis-1/generated/frontend/chainlist.json: Updated with comprehensive fallbacksosmosis-1/generated/state/state.json: Updated with backup endpoint trackingosmo-test-5/generated/frontend/chainlist.json: Updatedosmo-test-5/generated/state/state.json: UpdatedTesting
To test the validation locally:
Examples of Backup Usage
Osmosis: RPC[1] and REST[3] working (primary endpoints down)
Band Protocol: RPC[8] and REST[8] working (8 failed endpoints before finding working ones)
Axelar: RPC[1] and REST[2] working
Breaking Changes
None - this is backward compatible. Generated chainlist format remains the same.
After merging we should test ibc deposit/withdraw routes and be on guard for any reported fails.
Notes