Skip to content

Conversation

@JohnnyWyles
Copy link
Collaborator

@JohnnyWyles JohnnyWyles commented Nov 14, 2025

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

  • Independent RPC/REST Testing: RPC and REST endpoints are now tested separately, allowing them to use different backup indices
  • Sequential Backup Testing: Automatically tries all available endpoints until finding working ones
  • Backup Tracking: Records which backup index was used for each chain in the state file
  • Batch Processing: Validates chains in batches of 10 to avoid overwhelming endpoints

2. Smart Chainlist Generation

  • Endpoint Priority: Uses zone_chains.json as primary source, with ALL Chain Registry endpoints as fallbacks
  • Automatic Endpoint Promotion: Working endpoints from validation are automatically moved to position [0]
  • Comprehensive Fallbacks: Major chains now have 15+ fallback endpoints instead of just 1

3. Full Validation Workflow

  • New On-Demand Workflow: Added .github/workflows/full_validation.yml for validating all chains
  • Optional Regeneration: Workflow can optionally regenerate chainlists after validation

Results

Original chains (80 total):

  • Before: 17/80 passing (21.25%)
  • After: 44/80 passing (55%)
  • Improvement: +158% (+27 chains)

All chains (172 total):

  • Passing: 101/172 (58.7%)
  • Using backups: 110 chains

Technical Changes

Files Modified

  1. .github/workflows/utility/validateEndpoints.mjs

    • Added independent RPC/REST endpoint testing
    • Implemented sequential backup testing logic
    • Added fullValidation() function for validating all chains
    • Enhanced backup tracking in state file
  2. .github/workflows/utility/generate_chainlist_new.mjs

    • Changed endpoint priority to zone_chains → Chain Registry
    • Added validation state loading
    • Implemented automatic endpoint reordering based on validation results
    • Removed override_properties for simplification
  3. .github/workflows/full_validation.yml (NEW)

    • On-demand workflow for full chain validation
    • Optional chainlist regeneration
    • Automatic PR creation with results
  4. Generated Files

    • osmosis-1/generated/frontend/chainlist.json: Updated with comprehensive fallbacks
    • osmosis-1/generated/state/state.json: Updated with backup endpoint tracking
    • osmo-test-5/generated/frontend/chainlist.json: Updated
    • osmo-test-5/generated/state/state.json: Updated

Testing

To test the validation locally:

# Validate a specific chain
cd .github/workflows/utility
node validateEndpoints.mjs validateSpecificChain osmosis bandchain

# Run full validation (all chains)
node validateEndpoints.mjs fullValidation osmosis

# Generate chainlist with validated endpoints
node generate_chainlist_new.mjs

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

  • Validation refresh rates remain unchanged (7 days for success, 30 days for fails)
  • The routine bulk validation (in generate_all_files.yml) still validates 4 chains per run
  • Full validation workflow is meant for on-demand comprehensive checks

JohnnyWyles and others added 7 commits November 13, 2025 13:11
- 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
@JohnnyWyles JohnnyWyles requested a review from jasbanza November 14, 2025 11:54
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