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

Cosmos node liveness #6561

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Cosmos node liveness #6561

merged 1 commit into from
Feb 26, 2024

Conversation

mhagel
Copy link
Contributor

@mhagel mhagel commented Feb 2, 2024

Link to Issue

Closes: #5157

Description of Changes

  • Creates a fallback strategy for failing Cosmos nodes
  • Adds a health column to ChainNodes
  • Renames cosmosLCD to cosmosAPI/v1

"How We Fixed It"

  • If a chain node fails, we try the community proxy endpoint provided by cosmos.directory
  • For a given period (default 5 minutes), we continue to use the proxy (using health flag and last_updated)

Test Plan

  • Add playwright tests to demonstrate node-failure case (local only)
  • Devnet tests will run in CI
  • CA (click around) tested on local:
update "ChainNodes" set alt_wallet_url = 'willfail' where cosmos_chain_id = 'ux';
update "ChainNodes" set url = 'willalsofail' where cosmos_chain_id = 'ux';

Deployment Plan

  1. Optional env vars added for configuration. Not needed for deployment, although we may want to update the proxy referer when a whitelist header is agreed upon.
    COSMOS_PROXY_REFERER
    FALLBACK_NODE_DURATION_S in seconds (defaults to 300 if not provided)

Other Considerations

@mhagel mhagel force-pushed the mark.5157-liveness branch 4 times, most recently from d16e198 to f5755f2 Compare February 8, 2024 20:37
@mhagel mhagel changed the title Draft: liveness Cosmos node liveness Feb 8, 2024
@mhagel mhagel force-pushed the mark.5157-liveness branch from 8b30ba9 to 974d1fa Compare February 8, 2024 23:32
@mhagel mhagel marked this pull request as ready for review February 8, 2024 23:44
@mhagel mhagel force-pushed the mark.5157-liveness branch from 832c9a6 to fb4f874 Compare February 15, 2024 22:50
@mhagel mhagel marked this pull request as draft February 16, 2024 00:11
@mhagel mhagel marked this pull request as ready for review February 16, 2024 23:28
@mhagel mhagel requested a review from kurtisassad February 16, 2024 23:28
use batchClient

use db url if available, else proxy

- migration to add health field to ChainNode
- manage health in cosmosProxy depending on node response

use enum for health

closeBanner test helper

document env vars

remove cosmosLCD naming

handle missing cosmos_chain_id
@mhagel mhagel merged commit 478d86d into master Feb 26, 2024
6 of 7 checks passed
@mhagel mhagel deleted the mark.5157-liveness branch February 26, 2024 16:51
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.

Cosmos node liveness solution
3 participants